Loading...
Searching...
No Matches
MqContextC_ClassApi_C_API

MqContextC - access data related to the factory-type of the object … More...

+ Collaboration diagram for MqContextC_ClassApi_C_API:

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(...)
 

Detailed Description

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.

Macro Definition Documentation

◆ MqClassFactorySet

#define MqClassFactorySet ( ...)
Value:
#define MK_RT_CALL
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

Definition at line 49 of file msgque_overload_mq.h.

◆ MqClassFactorySet_C

#define MqClassFactorySet_C ( ...)
Value:
if (MkErrorCheckI(MqClassFactorySet(__VA_ARGS__)))
#define MqClassFactorySet(...)

Definition at line 51 of file msgque_overload_mq.h.

◆ MqClassFactorySet_E

#define MqClassFactorySet_E ( ...)
Value:
MkErrorCheck(MqClassFactorySet(__VA_ARGS__))

Definition at line 50 of file msgque_overload_mq.h.

◆ MqClassFactorySet_NULL

#define MqClassFactorySet_NULL ( ...)
Value:
#define MK_RT_CALL_NULL

Definition at line 48 of file msgque_overload_mq.h.

◆ MqClassIdentSet

#define MqClassIdentSet ( ...)
Value:
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

Definition at line 53 of file msgque_overload_mq.h.

◆ MqClassIdentSet_C

#define MqClassIdentSet_C ( ...)
Value:
if (MkErrorCheckI(MqClassIdentSet(__VA_ARGS__)))
#define MqClassIdentSet(...)

Definition at line 55 of file msgque_overload_mq.h.

◆ MqClassIdentSet_E

#define MqClassIdentSet_E ( ...)
Value:
MkErrorCheck(MqClassIdentSet(__VA_ARGS__))

Definition at line 54 of file msgque_overload_mq.h.

◆ MqClassIdentSet_NULL

#define MqClassIdentSet_NULL ( ...)
Value:

Definition at line 52 of file msgque_overload_mq.h.

Function Documentation

◆ MqClassFactoryGet()

MQ_EXTERN MQ_FCT const MqClassFactoryGet ( MQ_CTXN const ctx)

get the MqFactoryC used by the MqContextC

Parameters
[in]ctxthe MqContextC to extract the MqFactoryC from
Returns
the MqFactoryC
+ Here is the caller graph for this function:

◆ MqClassFactorySet_RT()

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

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextC to be linked with the MqFactoryC
[in]itemthe MqFactoryC to link with
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)

◆ MqClassIdentGet()

MQ_EXTERN MK_STRN MqClassIdentGet ( MQ_CTXN const ctx)

get the application-identification

Parameters
[in]ctxthe MqContextC to extract the ident from
Returns
the identifer or an empty string if ident was not set

An application has TWO possible names:

  1. The name from the context the application was configured with.
  2. The name from the factory the application was created with.

The --ident-from prefix|factory value decide which on is used.

The application-identification is defined by MqConfigS::identFrom :

MqFactoryS::originalIdentif ident == MQ_IDENT_FACTORY
MqConfigS::prefixif 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
Note
After the link-start, the MqLinkS::targetIdent is no longer changed.
Attention
The string is owned by pymqmsgque -> do not free !!
+ Here is the caller graph for this function:

◆ MqClassIdentSet_RT()

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

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextC to set the ident
[in]identthe MqFactoryS::originalIdent to link with
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
Attention
this function does not replace the ident of the current factory linked to context… this function replace the entire factory with a new factory identified by name. if the factory is not found or the link is already connected… an error is retured.

◆ MqClassOriginalIdentGet()

MQ_EXTERN MK_STRN MqClassOriginalIdentGet ( MQ_CTXN const ctx)

get the MqFactoryS::originalIdent from the MqContextC

Parameters
[in]ctxthe MqContextC to extract the original-ident from
Returns
the identifer or an empty string if no factory is available
Attention
the string is owned by pymqmsgque -> do not free !!
+ Here is the caller graph for this function: