Loading...
Searching...
No Matches

application-programmer configuration data More...

#include <LibMqMsgque_mq.h>

+ Collaboration diagram for MqSetupS:

Public Attributes

MQ_FCT factory
 set the application-identifier …
 
enum MqFactoryE factoryCall
 an object is created by an factory but using a different call-style
 
struct MqCallbackS BgError
 define the background-error-interface … A background error is an error without a link to an application-context and happen if an MqSendEND call fails or if an other asynchronous task fails. if the interface is not defined the error is printed to stderr and the application continue to work. if the interface is defined the context is set to error and the callback is called to process this error. Inside the callback the error is available using ErrorGetNum and ErrorGetText and can be cleared using ErrorReset.
 
bool isServer
 change the context to act as server-context (true) or not (false) …
 
struct MqCallbackS ServerSetup
 define the server-setup-interface (callback) used on startup …
 
struct MqCallbackS ServerCleanup
 define the server-cleanup-interface (callback) used on cleanup …
 
struct MqCallbackS Event
 Create a link to the calling tool event-handling queue … Event-Handling is used to process tasks in the background to give the tool-user the feeling of a non-blocking application. For example Tcl using the event-handling to update the Tk user-interface while the application is waiting for data. The event handling function is called on idle-time and is designed for a very short function execution time. Do only one action per function call. This function will be called with a ~10000 usec interval to guarantee a parallel like execution.
 
bool EventIsServer
 if MqSetupS::Event is a server event
 
bool ignoreExit
 do not delete the server-context on client-server-link shutdown … By default the server-context is deleted and the server-process or server-thread exit if the client close the connection. If this option is set to true the server will continue to work. Without client connection only the internal event function (set with IEvent) is available to work on tasks. if all (parent and child) event functions return with ErrorSetCONTINUE (nothing to do) the process finally exit. (default: false)
 

Detailed Description

application-programmer configuration data

Definition at line 1916 of file LibMqMsgque_mq.h.

Member Data Documentation

◆ BgError

struct MqCallbackS MqSetupS::BgError

define the background-error-interface … A background error is an error without a link to an application-context and happen if an MqSendEND call fails or if an other asynchronous task fails. if the interface is not defined the error is printed to stderr and the application continue to work. if the interface is defined the context is set to error and the callback is called to process this error. Inside the callback the error is available using ErrorGetNum and ErrorGetText and can be cleared using ErrorReset.

IBgError : callback signature
/* LABEL-NO */
package jvmsgque.mqmsgque;
public interface IBgError {
void BgError ();
}

Definition at line 1954 of file LibMqMsgque_mq.h.

◆ Event

struct MqCallbackS MqSetupS::Event

Create a link to the calling tool event-handling queue … Event-Handling is used to process tasks in the background to give the tool-user the feeling of a non-blocking application. For example Tcl using the event-handling to update the Tk user-interface while the application is waiting for data. The event handling function is called on idle-time and is designed for a very short function execution time. Do only one action per function call. This function will be called with a ~10000 usec interval to guarantee a parallel like execution.

Attention
1. The Event-Handler is used to start background processing during idel-time.
2. If MqSetupS::ignoreExit is set… and the process/thread is already on shutdown… the process/thread will continue to work as long as background tasks are available.
3. The process will only exit if all Event-Handler return ErrorSetCONTINUE to signal that no other background tasks are available.
example: example/LANG/Filter4.EXT
IEvent : callback signature
/* LABEL-NO */
package jvmsgque.mqmsgque;
public interface IEvent {
void Event ();
}

Definition at line 2013 of file LibMqMsgque_mq.h.

◆ EventIsServer

bool MqSetupS::EventIsServer

if MqSetupS::Event is a server event

Definition at line 2016 of file LibMqMsgque_mq.h.

◆ factory

MQ_FCT MqSetupS::factory

set the application-identifier …

The application-identifier is used as factory-lookup-identifier to create a new server-context and to modify the client or filter behaviour depending on the identifier-value of the remote-context and as factory lookup identifier to create a new server-context. The identifier is not changeable by the user, like the Name configuration option, because this is a "build-in" feature set by the programmer. Without the application-identifier only the initial startup-context is available to serve incoming requests. In general every server need to provide an application-identifier.

The application-identifier is used to create a new:

  • application-context (C, TCL) or a new class-object (C++, C#, JAVA, PYTHON, PERL, VB.NET)
  • server-child-context or slave-child-context using MqLinkCreateChild
  • server-parent-context using the StartAs option --thread
  • slave-worker-context using MqSlaveWorker
  • filter-parent-context using the StartAs option --fork or --thread

(default: "DEFAULT")

Attention
: if this value changes the factory need to be updated too.

Definition at line 1939 of file LibMqMsgque_mq.h.

◆ factoryCall

enum MqFactoryE MqSetupS::factoryCall

an object is created by an factory but using a different call-style

Definition at line 1942 of file LibMqMsgque_mq.h.

◆ ignoreExit

bool MqSetupS::ignoreExit

do not delete the server-context on client-server-link shutdown … By default the server-context is deleted and the server-process or server-thread exit if the client close the connection. If this option is set to true the server will continue to work. Without client connection only the internal event function (set with IEvent) is available to work on tasks. if all (parent and child) event functions return with ErrorSetCONTINUE (nothing to do) the process finally exit. (default: false)

Definition at line 2029 of file LibMqMsgque_mq.h.

◆ isServer

bool MqSetupS::isServer

change the context to act as server-context (true) or not (false) …

A server-context is responsible to answer service-requests. This options is also set as side-effect in a IServerSetup or IServerCleanup function-call. (default: false)

Definition at line 1964 of file LibMqMsgque_mq.h.

◆ ServerCleanup

struct MqCallbackS MqSetupS::ServerCleanup

define the server-cleanup-interface (callback) used on cleanup …

This interface is used to cleanup an old server-context-link, like a destructor, and is called at the beginning of MqLinkDelete to free context-specific variables. As side-effect this interface set MqSetupS::isServer to true.

IServerCleanup : callback signature
/* LABEL-NO */
package jvmsgque.mqmsgque;
public interface IServerCleanup {
void ServerCleanup () ;
}

Definition at line 1990 of file LibMqMsgque_mq.h.

◆ ServerSetup

struct MqCallbackS MqSetupS::ServerSetup

define the server-setup-interface (callback) used on startup …

This interface is used to configure a new server-context-link, like a constructor, and is called at the end of MqLinkCreate or MqLinkCreateChild. This interface is called for every new incoming connection request and is used to define context specific services using MqServiceCreate or to initialize context-specific variables. As side-effect this interface set MqSetupS::isServer to true.

IServerSetup : callback signature
/* LABEL-NO */
package jvmsgque.mqmsgque;
public interface IServerSetup {
void ServerSetup () ;
}

Definition at line 1979 of file LibMqMsgque_mq.h.


The documentation for this struct was generated from the following files: