theLink 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - rb - jv - cc
Loading...
Searching...
No Matches
MqContextC_C_API

MqContextC - the class known as ctx or context is the application-handle of the application-server and also the main data-handleMore...

+ Collaboration diagram for MqContextC_C_API:

Topics

 MqCtxTypeC
 MqCtxTypeS - the instance-base for the MqContextC
 
 MqContextC_Class_C_API
 MqContextC - define the class …
 
 MqContextC_TOR_C_API
 MqContextC - various functions to create, initialize and destroy a context
 
 MqContextC_TypeApi_C_API
 MqContextC - various types used by libmqmsgque
 
 MqContextC_ClassApi_C_API
 MqContextC - access data related to the factory-type of the object …
 
 MqContextC_ConfigApi_C_API
 MqContextC - various functions to config a context
 
 MqContextC_LinkApi_C_API
 
 MqContextC_SlaveApi_C_API
 MqContextC - create and manage a slave context …
 
 MqContextC_SendApi_C_API
 MqContextC - construct an outgoing send-data-package
 
 MqContextC_ReadApi_C_API
 MqContextC - extract data from an incoming read-data-package
 
 MqContextC_ProxyApi_C_API
 MqContextC - copy data from the read-data-package of the sourceCtx to the send-data-package of the targetCtx
 
 MqContextC_RouteApi_C_API
 MqContextC - setup and manage a routing-link
 
 MqContextC_ServiceApi_C_API
 MqContextC - create and manage a service …
 
 MqContextC_StorageApi_C_API
 MqContextC - setup and manage a storage used to persist data-packages
 
 MqContextC_HighApi_C_API
 MqContextC - User friendly replacement for the MqContextC_SendApi_C_API and the MqContextC_ReadApi_C_API
 
 MqContextC_EnvApi_C_API
 MqContextC - protect and restore the service-environment …
 
 MqContextC_ErrorApi_C_API
 MqContextC - move and copy an error from a context
 
 MqContextC_LogApi_C_API
 MqContextC - log the output to a string or a MkLogFileC
 
 MqContextC_FilterApi_C_API
 MqContextC - modify the data using the filter-technology
 
 MqContextC_MiscApi_C_API
 MqContextC - various functions to work on a context
 

Data Structures

struct  MQ_CTX_A
 array of MqContextC instances More...
 
struct  MqContextS
 PUBLIC data structure for the libmqmsgque-specific-data More...
 

Functions

MK_ERR MqContextErrorFORMAT (MQ_CTXN const fmtobj)
 helper used to access MkErrorDEFAULT from MqContextC
 

Detailed Description

MqContextC - the class known as ctx or context is the application-handle of the application-server and also the main data-handle

The context is the package-item with the required features and created by the implementation-layer-programmer. The context can be a client or a server.

HOWTO client-context

The client-context-creation is triggerd by the software-workflow on demand. The client is calling the MqLinkCreate to create a connection to the server using the connection-arguments to specify the target.

The life-cycle of a client is:

ContextCreate create and initialize the MqContextC ...
LinkCreate make ctx to a parent-context and setup a new client-server-link
SendTT MqContextC - append a native PRIMITIVE TYPE value to the send-data-package
ReadTT read a PRIMITIVE TYPE from the read-data-package
LinkDelete close the client-server-link
ContextDelete Destructor - delete a MqContextC instance …
Exit delete the context and exit the current process or thread …

HOWTO server-context

The server-context-creation is always triggerd by the MqLinkCreate command of the client. The server is usually using a factory-constructor to call the MqContextCreate and finally to call the MqContextDelete.
The server-context is fully under control of the client.

The life-cycle of a server is:

SETUPdefine a class and add the setup/cleanup code
IServerSetup define the server-setup-interface (callback) used on startup …
ServiceCreate create a link between a service-token and a service-callback
IServerCleanup define the server-cleanup-interface (callback) used on cleanup …
ServiceDelete delete a service. …
STARTUPdefine the factory and start the listener
FactoryAdd add a new MqFactoryC identified by factory-identifier and defined by factory-constructor
FactoryNew create a new MqContextC from a MqFactoryC
LinkCreate make ctx to a parent-context and setup a new client-server-link
ProcessEvent enter the event-loop and wait for an incoming service-request. …
WORKprocess the service-calls and exit on end
ReadTT read a PRIMITIVE TYPE from the read-data-package
SendTT MqContextC - append a native PRIMITIVE TYPE value to the send-data-package
Exit delete the context and exit the current process or thread …

MqContextS CTOR and DTOR

command alias
(constructor,static,runtime) MQ_CTX MqContextCreate(MQ_CTX const tmpl) no
(destructor,runtime) void MqContextDelete(MQ_CTX ctx) no

Function Documentation

◆ MqContextErrorFORMAT()

MK_ERR MqContextErrorFORMAT ( MQ_CTXN const fmtobj)
inline

helper used to access MkErrorDEFAULT from MqContextC

Definition at line 4426 of file LibMqMsgque_mq.h.

4428 {
4429 return MkErrorFORMAT(MkOBJ(fmtobj));
4430}
MK_EXTERN MK_ERR MkErrorFORMAT(MK_OBJN fmtobj)
#define MkOBJ(x)