libmqmsgque 9.0
Loading...
Searching...
No Matches
Data Fields

application-programmer configuration data More...

#include <msgque_mq.h>

+ Collaboration diagram for MqSetupS:

Data Fields

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 SendEND 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 (MK_YES) or not (MK_NO) …
 
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 MK_YES 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: MK_NO)
 

Detailed Description

application-programmer configuration data

Definition at line 1897 of file msgque_mq.h.

Field 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 SendEND 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.

Definition at line 1935 of file msgque_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

Definition at line 1994 of file msgque_mq.h.

◆ EventIsServer

bool MqSetupS::EventIsServer

if MqSetupS::Event is a server event

Definition at line 1997 of file msgque_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 LinkCreateChild
  • server-parent-context using the StartAs option --thread
  • slave-worker-context using SlaveWorker
  • 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 1920 of file msgque_mq.h.

◆ factoryCall

enum MqFactoryE MqSetupS::factoryCall

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

Definition at line 1923 of file msgque_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 MK_YES 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: MK_NO)

Definition at line 2010 of file msgque_mq.h.

◆ isServer

bool MqSetupS::isServer

change the context to act as server-context (MK_YES) or not (MK_NO) …

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: MK_NO)

Definition at line 1945 of file msgque_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 LinkDelete to free context-specific variables. As side-effect this interface set MqSetupS::isServer to MK_YES.

Definition at line 1971 of file msgque_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 LinkCreate or LinkCreateChild. This interface is called for every new incoming connection request and is used to define context specific services using ServiceCreate or to initialize context-specific variables. As side-effect this interface set MqSetupS::isServer to MK_YES.

Definition at line 1960 of file msgque_mq.h.


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