MqContextC - access data related to the factory-type of the object … More...
Functions | |
MQ_EXTERN MQ_FCT const | MqClassFactoryGet (MQ_CTXN const ctx) MK_ATTR_HDL |
get the MqFactoryC used by the MqContextC | |
MQ_EXTERN enum MkErrorE | MqClassFactorySet_RT (MK_RT const mkrt, MQ_CTX const ctx, MQ_FCT const item) |
link the MqContextC to a new MqFactoryC | |
MQ_EXTERN enum MkErrorE | MqClassIdentSet_RT (MK_RT const mkrt, MQ_CTX const ctx, MK_STRN ident) |
link the MqContextC to a new MqFactoryC identified by ident | |
MQ_EXTERN MK_STRN | MqClassIdentGet (MQ_CTXN const ctx) MK_ATTR_HDL |
get the application-identification … | |
MQ_EXTERN MK_STRN | MqClassOriginalIdentGet (MQ_CTXN const ctx) MK_ATTR_HDL |
get the MqFactoryS::originalIdent from the MqContextC | |
MqContextC - MqContextC_ClassApi_Class_C_API - overload | |
#define | MqClassFactorySet_NULL(...) |
#define | MqClassFactorySet(...) |
#define | MqClassFactorySet_E(...) |
#define | MqClassFactorySet_C(...) |
#define | MqClassIdentSet_NULL(...) |
#define | MqClassIdentSet(...) |
#define | MqClassIdentSet_E(...) |
#define | MqClassIdentSet_C(...) |
MqContextC - access data related to the factory-type of the object …
The type of an object is related to the MqFactoryC. The factory decide which class a new created object has. The factory has two identifiers:
The relevance of the MqContextC CLASS API based type system, provided by MqFactoryC, decreased with the rise of the MANAGED OBJECT technology.
The MqContextC CLASS API based type system has more influence for target-languages without reflection, like C or C++.
The factory is something like a constructor but only support the application-context MqContextC .
The MqContextC ROUTE API using the MqClassIdentGet from MqFactoryC to identify an application from remote.
#define MqClassFactorySet | ( | ... | ) |
Definition at line 49 of file msgque_overload_mq.h.
#define MqClassFactorySet_C | ( | ... | ) |
Definition at line 51 of file msgque_overload_mq.h.
#define MqClassFactorySet_E | ( | ... | ) |
Definition at line 50 of file msgque_overload_mq.h.
#define MqClassFactorySet_NULL | ( | ... | ) |
Definition at line 48 of file msgque_overload_mq.h.
#define MqClassIdentSet | ( | ... | ) |
Definition at line 53 of file msgque_overload_mq.h.
#define MqClassIdentSet_C | ( | ... | ) |
Definition at line 55 of file msgque_overload_mq.h.
#define MqClassIdentSet_E | ( | ... | ) |
Definition at line 54 of file msgque_overload_mq.h.
#define MqClassIdentSet_NULL | ( | ... | ) |
Definition at line 52 of file msgque_overload_mq.h.
get the MqFactoryC used by the MqContextC
[in] | ctx | the MqContextC to extract the MqFactoryC from |
MQ_EXTERN enum MkErrorE MqClassFactorySet_RT | ( | MK_RT const | mkrt, |
MQ_CTX const | ctx, | ||
MQ_FCT const | item ) |
link the MqContextC to a new MqFactoryC
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | ctx | the MqContextC to be linked with the MqFactoryC |
[in] | item | the MqFactoryC to link with |
MkExceptionC | → The default-exception from the Programming-Language-Micro-Kernel (PLMK) |
get the application-identification …
[in] | ctx | the MqContextC to extract the ident from |
An application has TWO possible names:
The --ident-from prefix|factory value decide which on is used.
The application-identification is defined by MqConfigS::identFrom :
MqFactoryS::originalIdent | if ident == MQ_IDENT_FACTORY |
MqConfigS::prefix | if ident == MQ_IDENT_PREFIX (default) |
The MqFactoryS::originalIdent is the official name of the MqFactoryC and is defined by the application-programmer with MqFactoryAdd or MqFactoryDup2.
The MqConfigS::prefix is the official name of the MqContextC that startet first, usually the server-name, and is set by the application-user with --prefix string at startup or with the MqConfigSetPrefix at setup.
When the server starts, the MqClassIdentGet value is send from the server to the client and the client initializes the MqLinkS::targetIdent with this value. This value identifes the server from remote and is used by the MqContextC ROUTE API to select which server receive the routing-package.
The client usually get the factory and the idenfication from the: MqFactoryInitial.
Example: Change the factory-identifier of MqFactoryInitial to the value "TestClient" with:
C# | MqFactoryC.Get("initial").Dup2("TestClient").Initial() |
TCL | [[tclmsgque::MqFactoryC Get "initial"] Dup2 "TestClient"] Initial |
link the MqContextC to a new MqFactoryC identified by ident
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | ctx | the MqContextC to set the ident |
[in] | ident | the MqFactoryS::originalIdent to link with |
MkExceptionC | → The default-exception from the Programming-Language-Micro-Kernel (PLMK) |
get the MqFactoryS::originalIdent from the MqContextC
[in] | ctx | the MqContextC to extract the original-ident from |