Loading...
Searching...
No Matches
MqContextC_ServiceApi_C_API

MqContextC - create and manage a service … More...

+ Collaboration diagram for MqContextC_ServiceApi_C_API:

Topics

 MqContextC_ServiceApi_Identifer
 MqContextC - a char[4+1] or hex[8+1] string used to unique identify a service …
 
 MqContextC_ServiceApi_Callback
 Service callback summary …
 

Macros

#define MQ_TOK_SIZE   (8+1)
 maximum size of the libmqmsgque::MQ_TOK
 

Typedefs

typedef MK_STRN libmqmsgque::MQ_TOK
 MqContextC - a char[4+1] or hex[8+1] string used to unique identify a service …
 
typedef MqTokenF libmqmsgque::MqServiceCallbackF
 MqContextC - the callback-function is used as a service-handle or as a event-handle
 

Functions

MK_ATTR_HDL bool libmqmsgque::MqServiceIsTransaction (MQ_CTX const ctx)
 check if the ongoing-service-call belongs to a transaction …
 
MQ_EXTERN MQ_TOK libmqmsgque::MqServiceTokenGet (MQ_CTX const ctx) MK_ATTR_HDL
 in an ongoing-service-call get the current MqContextC_ServiceApi_Identifer
 
MQ_EXTERN bool libmqmsgque::MqServiceTokenCheck (MQ_CTX const ctx, MQ_TOK const token) MK_ATTR_HDL
 in an ongoing-service-call check if the current MqContextC_ServiceApi_Identifer is token
 
MQ_EXTERN bool libmqmsgque::MqServiceTokenExists (MQ_CTX const ctx, MQ_TOK const token) MK_ATTR_HDL
 check if the MqContextC_ServiceApi_Identifer token is defined as ctx service …
 
MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceCreate_RT (MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token, MqServiceCallbackF const fCall, MK_CBP callback, MqDataFreeF fFree, MkMarkF fMark)
 create a link between a service-token and a service-callback
 
MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceStorage_RT (MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token)
 setup a service listen on a MqContextC_ServiceApi_Identifer and save all read-data-package into the STORAGE
 
MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceDelete_RT (MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token)
 delete a service. …
 

MqServiceProxy

create a service to link a master-context with a slave-context. …

This function is used to create a proxy-service to forward the body-data from the read-data-package of the master to the send-data-package of the slave. The data is not changed. This function support the reverse-operation also. If the ctx is a master-context than the data is send to slave identified by id. If the ctx is a slave-context than the data is send to the master of the slave.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
[in]tokenthe MqContextC SERVICE API to identify the service
[in]idthe SlaveId to unique identify the master/slave link, the id < libmqmsgque::MQ_SLAVE_USER is internal.
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceProxy_RT (MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token, MQ_SLAVE_ID const id)
 create a service to link a master-context with a slave-context. …
 
MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceProxyCtx_RT (MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token, MQ_CTX const target)
 same as MqServiceProxy but use an MqContextC as input.
 
MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceProxyRoundRobin_RT (MK_RT const mkrt, MQ_CTX const ctx, MQ_TOK const token, MK_STRN const ident)
 create a proxy-service using Round-Robin as load-balancer …
 
MQ_EXTERN bool libmqmsgque::MqServiceProxyCtxExists (MQ_CTX const ctx, MQ_TOK const token, MQ_CTX const target)
 check if service who belongs to token is a proxy-service
 

MqContextC - MqContextC_ServiceApi_Service_C_API - overload

#define MqServiceCreate_NULL(...)
 
#define MqServiceCreate(...)
 
#define MqServiceCreate_E(...)
 
#define MqServiceCreate_C(...)
 
#define MqServiceDelete_NULL(...)
 
#define MqServiceDelete(...)
 
#define MqServiceDelete_E(...)
 
#define MqServiceDelete_C(...)
 
#define MqServiceProxy_NULL(...)
 
#define MqServiceProxy(...)
 
#define MqServiceProxy_2(ctx, token)
 
#define MqServiceProxy_E(...)
 
#define MqServiceProxy_C(...)
 
#define MqServiceProxyCtx_NULL(...)
 
#define MqServiceProxyCtx(...)
 
#define MqServiceProxyCtx_E(...)
 
#define MqServiceProxyCtx_C(...)
 
#define MqServiceProxyRoundRobin_NULL(...)
 
#define MqServiceProxyRoundRobin(...)
 
#define MqServiceProxyRoundRobin_E(...)
 
#define MqServiceProxyRoundRobin_C(...)
 
#define MqServiceStorage_NULL(...)
 
#define MqServiceStorage(...)
 
#define MqServiceStorage_E(...)
 
#define MqServiceStorage_C(...)
 

Detailed Description

MqContextC - create and manage a service …

To provide a service is the main purpose of a server and the main-purpose of a client/server connection is to call a service and to process the result.
A service can be defined on the server or on the client. On the server a service can be initial setup with IServerSetup method and finally cleanup with IServerCleanup.

‍A service is created with the MqServiceCreate and deleted with the MqServiceDelete.

A service can be created and deleted during the entire life-cycle of the server or the client. If the server/client-context is deleted all services of the are deleted also.

‍A MqServiceDelete is not required.

Creating or deleting a service is like granting or revoking the right to access a single feature.

eventloop

To receive a data-package on a service the event-loop have to be active. The event-loop ia always active on an synchronous-service-call . On a server the event-loop is started with MqProcessEvent at startup.
synchronous-service-call
A synchronous-service-call always block and enter the event-loop to wait for an answer
asynchronous-service-call
A asynchronous-service-call always return immediately and the possible result is received on a callback

callback

A callback is the function called by a service and required to receive data from remote.
A callback is created with MqServiceCreate or is part of the service-call.
A callback can be a service-identifer or a service-callback.
service-call with callback
SendEND_AND_CALLBACK, SendEND_AND_SUB, SendEND_AND_TRANSACTION
service-call without callback
SendEND, SendEND_AND_WAIT

Example from MyServer.cc define the service SRV1 on the server-link-setup

#include "LibMqMsgque_cc.hh"

using namespace ccmqmsgque;

// package-item
class MyServer : public MqContextC, public IServerSetup {
  friend class MqFactoryCT<MyServer>;
  private:
    // define the factory constructor
    MyServer(MK_TYP const typ, MqContextC* tmpl=NULL) : MqContextC(typ,tmpl) {};

  private:
    // service to serve all incoming requests for token "HLWO"
    void MyFirstService () {
      SendSTART();
      SendV("%s World", ReadSTR());
      SendRETURN();
    }

    // define a service as link between the token "HLWO" and the callback "MyFirstService"
    void ServerSetup() {
      ServiceCreate("HLWO", MqServiceICB(&MyServer::MyFirstService));
    }
};

// package-main
int MK_CDECL main(int argc, MK_STRN argv[]) {
  MqMsgque::Setup();

  // setup commandline arguments for later use
  MkBufferListC largs = {argc, argv};
  // create "MyServer" factory… and make it to the default.
  MqFactoryCT<MyServer>::Add("MyServer")->Default();
  // inspect commandline-argument for the "factory" to choose… and create a object
  auto srv = MqFactoryCT<MqContextC>::GetCalled(largs)->New();
  // start listen for incoming call's
  try {
    srv->LinkCreate(largs);
    srv->ProcessEvent (MQ_WAIT_FOREVER);
  } catch (const std::exception& e) {
    srv->ErrorCatch(e);
  }
  srv->Exit();
}

Macro Definition Documentation

◆ MQ_TOK_SIZE

#define MQ_TOK_SIZE   (8+1)

maximum size of the libmqmsgque::MQ_TOK

Definition at line 5778 of file LibMqMsgque_mq.h.

◆ MqServiceCreate

#define MqServiceCreate ( ...)
Value:
MqServiceCreate_RT(MK_RT_CALL __VA_ARGS__)
#define MK_RT_CALL

Definition at line 720 of file msgque_overload_mq.h.

◆ MqServiceCreate_C

#define MqServiceCreate_C ( ...)
Value:
if (MkErrorCheckI(MqServiceCreate(__VA_ARGS__)))
#define MqServiceCreate(...)

Definition at line 722 of file msgque_overload_mq.h.

◆ MqServiceCreate_E

#define MqServiceCreate_E ( ...)
Value:
MkErrorCheck(MqServiceCreate(__VA_ARGS__))

Definition at line 721 of file msgque_overload_mq.h.

◆ MqServiceCreate_NULL

#define MqServiceCreate_NULL ( ...)
Value:
MqServiceCreate_RT(MK_RT_CALL_NULL __VA_ARGS__)
#define MK_RT_CALL_NULL

Definition at line 719 of file msgque_overload_mq.h.

◆ MqServiceDelete

#define MqServiceDelete ( ...)
Value:
MqServiceDelete_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 724 of file msgque_overload_mq.h.

◆ MqServiceDelete_C

#define MqServiceDelete_C ( ...)
Value:
if (MkErrorCheckI(MqServiceDelete(__VA_ARGS__)))
#define MqServiceDelete(...)

Definition at line 726 of file msgque_overload_mq.h.

◆ MqServiceDelete_E

#define MqServiceDelete_E ( ...)
Value:
MkErrorCheck(MqServiceDelete(__VA_ARGS__))

Definition at line 725 of file msgque_overload_mq.h.

◆ MqServiceDelete_NULL

#define MqServiceDelete_NULL ( ...)
Value:
MqServiceDelete_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 723 of file msgque_overload_mq.h.

◆ MqServiceProxy

#define MqServiceProxy ( ...)
Value:
MqServiceProxy_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 728 of file msgque_overload_mq.h.

◆ MqServiceProxy_2

#define MqServiceProxy_2 ( ctx,
token )
Value:
MqServiceProxy(ctx,token,MQ_SLAVE_OTHER)
#define MqServiceProxy(...)

Definition at line 729 of file msgque_overload_mq.h.

◆ MqServiceProxy_C

#define MqServiceProxy_C ( ...)
Value:
if (MkErrorCheckI(MqServiceProxy(__VA_ARGS__)))

Definition at line 731 of file msgque_overload_mq.h.

◆ MqServiceProxy_E

#define MqServiceProxy_E ( ...)
Value:
MkErrorCheck(MqServiceProxy(__VA_ARGS__))

Definition at line 730 of file msgque_overload_mq.h.

◆ MqServiceProxy_NULL

#define MqServiceProxy_NULL ( ...)
Value:
MqServiceProxy_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 727 of file msgque_overload_mq.h.

◆ MqServiceProxyCtx

#define MqServiceProxyCtx ( ...)
Value:
MqServiceProxyCtx_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 733 of file msgque_overload_mq.h.

◆ MqServiceProxyCtx_C

#define MqServiceProxyCtx_C ( ...)
Value:
if (MkErrorCheckI(MqServiceProxyCtx(__VA_ARGS__)))
#define MqServiceProxyCtx(...)

Definition at line 735 of file msgque_overload_mq.h.

◆ MqServiceProxyCtx_E

#define MqServiceProxyCtx_E ( ...)
Value:
MkErrorCheck(MqServiceProxyCtx(__VA_ARGS__))

Definition at line 734 of file msgque_overload_mq.h.

◆ MqServiceProxyCtx_NULL

#define MqServiceProxyCtx_NULL ( ...)
Value:
MqServiceProxyCtx_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 732 of file msgque_overload_mq.h.

◆ MqServiceProxyRoundRobin

#define MqServiceProxyRoundRobin ( ...)
Value:
MqServiceProxyRoundRobin_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 737 of file msgque_overload_mq.h.

◆ MqServiceProxyRoundRobin_C

#define MqServiceProxyRoundRobin_C ( ...)
Value:
if (MkErrorCheckI(MqServiceProxyRoundRobin(__VA_ARGS__)))
#define MqServiceProxyRoundRobin(...)

Definition at line 739 of file msgque_overload_mq.h.

◆ MqServiceProxyRoundRobin_E

#define MqServiceProxyRoundRobin_E ( ...)
Value:
MkErrorCheck(MqServiceProxyRoundRobin(__VA_ARGS__))

Definition at line 738 of file msgque_overload_mq.h.

◆ MqServiceProxyRoundRobin_NULL

#define MqServiceProxyRoundRobin_NULL ( ...)
Value:
MqServiceProxyRoundRobin_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 736 of file msgque_overload_mq.h.

◆ MqServiceStorage

#define MqServiceStorage ( ...)
Value:
MqServiceStorage_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 741 of file msgque_overload_mq.h.

◆ MqServiceStorage_C

#define MqServiceStorage_C ( ...)
Value:
if (MkErrorCheckI(MqServiceStorage(__VA_ARGS__)))
#define MqServiceStorage(...)

Definition at line 743 of file msgque_overload_mq.h.

◆ MqServiceStorage_E

#define MqServiceStorage_E ( ...)
Value:
MkErrorCheck(MqServiceStorage(__VA_ARGS__))

Definition at line 742 of file msgque_overload_mq.h.

◆ MqServiceStorage_NULL

#define MqServiceStorage_NULL ( ...)
Value:
MqServiceStorage_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 740 of file msgque_overload_mq.h.

Typedef Documentation

◆ MQ_TOK

MqContextC - a char[4+1] or hex[8+1] string used to unique identify a service …

A service is defined in pseudocode as:

MqServiceCreate(context, token-identifier, callback)

The token-identifier is defined by the programmer using MqServiceCreate to link a callback with an token-identifier. The token-identifier is part of the MqSendEND, MqSendEND_AND_WAIT, MqSendEND_AND_CALLBACK or MqSendEND_AND_TRANSACTION function-call to identify the service to call.

char[4+1]

This is the "traditional" service identifer, the restriction to char[4+1] is used to speedup service lookup by direct mapping of the char[4] string to an libmkkernel::MK_I32 integer.

For internal purpose some special token are predefined:

  • _??? - all token starting with a "_" are for internal usage only
  • +ALL - used in MqServiceCreate and MqServiceDelete to setup an event-handler able to listen on all token not handled by an other token more precise.
  • -ALL - used in MqServiceDelete to delete all token
  • +FTR and +EOF - used for one-directional-filter

hex[8+1]

This identifer is used by the rpc feature.

‍The hex[8+1] is a mapping of the api-function-name to a 32bit hash using the MkSysHashI32 transformed into an sprintf("%08X") string.


The goal is to create a unique service identifer atomatically from the already uniqe api-function-name.

Definition at line 5775 of file LibMqMsgque_mq.h.

◆ MqServiceCallbackF

MqContextC - the callback-function is used as a service-handle or as a event-handle

A service is using a callback to act on an incoming service-request. The callback is linked to a MqContextC_ServiceApi_Identifer with MqServiceCreate or is used as argument to the MqSendEND_AND_CALLBACK function.

service callbacks are:

Definition at line 5790 of file LibMqMsgque_mq.h.

Function Documentation

◆ MqServiceCreate_RT()

MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceCreate_RT ( MK_RT const mkrt,
MQ_CTX const ctx,
MQ_TOK const token,
MqServiceCallbackF const fCall,
MK_CBP callback,
MqDataFreeF fFree,
MkMarkF fMark )

create a link between a service-token and a service-callback

The servive-token (e.g. MqContextC_ServiceApi_Identifer) have to be unique but the service-callback (e.g. libmqmsgque::MqServiceCallbackF) not. If a service-callback is not unique than this is called an alias, use MQ_TOK ctx.ServiceTokenGet() to get the current token for an incoming-service-call.

The service-callback have to be callable by the server and/or by the child and/or the slave context. A static-callback is a good choice to achive this goal.

The filter, a slave-context, is setup with the initial factory using the initial-class (MqContextC) usually different from the server-class (MyServer…). The filter need the service-callback, usually shared with the server, to report a filter-message to the server.
To distinguish the server and the filter the following functions are used
(all function cann be called as either server or filter context):

Example from Filter6.cc setup the services for server and filter

    void ServerSetup() {
      MqContextC *ftr = SlaveGetFilter();
      FH = NULL;
      // SERVER: listen on every token (+ALL)
      ServiceCreate       ("LOGF", MqServiceICB(&Filter6::LOGF));
      ServiceCreate       ("EXIT", MqServiceICB(&Filter6::EXIT));
      ServiceCreate       ("SOEX", MqServiceICB(&Filter6::SOEX));
      ServiceCreate       ("+ALL", MqServiceICB(&Filter6::FilterIn));
      ServiceStorage      ("PRNT");
      ServiceStorage      ("PRN2");
      ftr->ServiceCreate  ("WRIT", MqTokenCCB(&Filter6::WRIT));
      ServiceCreate       ("WRIT", MqTokenCCB(&Filter6::WRIT));
      ftr->ServiceProxy   ("WRT2", MQ_SLAVE_MASTER);

      if (isParent()) {
        LinkCheckOptionI32  ("--retryCnt", &Filter6::retryCnt);
      }
    }
Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
[in]tokenthe MqContextC SERVICE API to identify the service
[in]fCallthe C-function to process the incoming service-request (C-API only)
[in]callbackthe user defined callback as data-argument for the C-function fCall
[in]fFreethe function to free the data-argument after use (C-API only)
[in]fMarkthe function to mark the data-argument during garbage-collection (C-API only)
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
Attention
the link-setup (MqLinkCreate or MqLinkCreateChild) have to done before using this function
MqServiceCreate : callback overload
void ServiceCreate (MQ_TOK token, MqServiceICB callback);
void ServiceCreate (const std::string& token, MqServiceICB callback);
void ServiceCreate (MQ_TOK token, MqServiceCCB callback);
void ServiceCreate (const std::string& token, MqServiceCCB callback);
void ServiceCreate (MQ_TOK token, MqServiceIF* callback);
MK_STRN MQ_TOK
MqContextC - a char[4+1] or hex[8+1] string used to unique identify a service …
MqServiceCreate : callback signature
read more at Callback signature

◆ MqServiceDelete_RT()

MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceDelete_RT ( MK_RT const mkrt,
MQ_CTX const ctx,
MQ_TOK const token )

delete a service. …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
[in]tokenthe MqContextC SERVICE API to identify the service
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)

◆ MqServiceIsTransaction()

MK_ATTR_HDL bool libmqmsgque::MqServiceIsTransaction ( MQ_CTX const ctx)
inline

check if the ongoing-service-call belongs to a transaction …

A service-call can be with-transaction (return true if the package was send with MqSendEND_AND_WAIT or MqSendEND_AND_CALLBACK) or can be without-transaction (return false if the package was send with MqSendEND)

Parameters
[in]ctxthe MqContextS instance to work on
Returns
a boolean value, true or false

Definition at line 5800 of file LibMqMsgque_mq.h.

5802 {
5803 MK_ATTR_HDL_CHECK(ctx);
5804 return (ctx->link.protect.transSId != 0);
5805}
+ Here is the caller graph for this function:

◆ MqServiceProxy_RT()

MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceProxy_RT ( MK_RT const mkrt,
MQ_CTX const ctx,
MQ_TOK const token,
MQ_SLAVE_ID const id )

create a service to link a master-context with a slave-context. …

This function is used to create a proxy-service to forward the body-data from the read-data-package of the master to the send-data-package of the slave. The data is not changed. This function support the reverse-operation also. If the ctx is a master-context than the data is send to slave identified by id. If the ctx is a slave-context than the data is send to the master of the slave.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
[in]tokenthe MqContextC SERVICE API to identify the service
[in]idthe SlaveId to unique identify the master/slave link, the id < libmqmsgque::MQ_SLAVE_USER is internal.
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)

◆ MqServiceProxyCtx_RT()

MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceProxyCtx_RT ( MK_RT const mkrt,
MQ_CTX const ctx,
MQ_TOK const token,
MQ_CTX const target )

same as MqServiceProxy but use an MqContextC as input.

See also
MqServiceProxy

◆ MqServiceProxyCtxExists()

MQ_EXTERN bool libmqmsgque::MqServiceProxyCtxExists ( MQ_CTX const ctx,
MQ_TOK const token,
MQ_CTX const target )

check if service who belongs to token is a proxy-service

This is used for route (MqRouteDelete) to identify the service-usage

See also
MqServiceProxy
+ Here is the caller graph for this function:

◆ MqServiceProxyRoundRobin_RT()

MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceProxyRoundRobin_RT ( MK_RT const mkrt,
MQ_CTX const ctx,
MQ_TOK const token,
MK_STRN const ident )

create a proxy-service using Round-Robin as load-balancer …

This function is used to create a proxy-service to forward the body-data from the read-data-package of the master-context to the send-data-package of the slave-context. The data is not changed. This function support the reverse-operation also. If the ctx is a master-context than the data is send to one of the slave-context identified by ident. If the ctx is a slave-context than the data is send to the master-context of the slave.

The Round-Robin-Load-Balancer is only used for the direction from the master-context to the slave-context if the name-resolution return multiple target-context for the single ident.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
[in]tokenthe MqContextC SERVICE API to identify the service
[in]identthe targetIdent used to select a list slave-Context for the Round-Robin
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)

◆ MqServiceStorage_RT()

MQ_EXTERN enum MkErrorE libmqmsgque::MqServiceStorage_RT ( MK_RT const mkrt,
MQ_CTX const ctx,
MQ_TOK const token )

setup a service listen on a MqContextC_ServiceApi_Identifer and save all read-data-package into the STORAGE

In a shortterm-transaction-synchronous-service-call the service will return an empty data package. In a longterm-transaction-synchronous-service-call the data will return as normal.

Example from Filter6.cc using MqServiceStorage to store all packages from service PRNT and PRN2 into database

    void ServerSetup() {
      MqContextC *ftr = SlaveGetFilter();
      FH = NULL;
      // SERVER: listen on every token (+ALL)
      ServiceCreate       ("LOGF", MqServiceICB(&Filter6::LOGF));
      ServiceCreate       ("EXIT", MqServiceICB(&Filter6::EXIT));
      ServiceCreate       ("SOEX", MqServiceICB(&Filter6::SOEX));
      ServiceCreate       ("+ALL", MqServiceICB(&Filter6::FilterIn));
      ServiceStorage      ("PRNT");
      ServiceStorage      ("PRN2");
      ftr->ServiceCreate  ("WRIT", MqTokenCCB(&Filter6::WRIT));
      ServiceCreate       ("WRIT", MqTokenCCB(&Filter6::WRIT));
      ftr->ServiceProxy   ("WRT2", MQ_SLAVE_MASTER);

      if (isParent()) {
        LinkCheckOptionI32  ("--retryCnt", &Filter6::retryCnt);
      }
    }
Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]ctxthe MqContextS instance to work on
[in]tokenthe MqContextC SERVICE API to identify the service
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)

◆ MqServiceTokenCheck()

MQ_EXTERN bool libmqmsgque::MqServiceTokenCheck ( MQ_CTX const ctx,
MQ_TOK const token )

in an ongoing-service-call check if the current MqContextC_ServiceApi_Identifer is token

See also
MqServiceTokenGet
Parameters
[in]ctxthe MqContextS instance to work on
[in]tokenthe MqContextC SERVICE API to identify the service
Returns
a boolean value, true or false
+ Here is the caller graph for this function:

◆ MqServiceTokenExists()

MQ_EXTERN bool libmqmsgque::MqServiceTokenExists ( MQ_CTX const ctx,
MQ_TOK const token )

check if the MqContextC_ServiceApi_Identifer token is defined as ctx service …

This code is used to detect if a service with identifer token exists.

See also
MqRouteTraverse
Parameters
[in]ctxthe MqContextS instance to work on
[in]tokenthe MqContextC SERVICE API to identify the service
Returns
a boolean value, true or false
+ Here is the caller graph for this function:

◆ MqServiceTokenGet()

MQ_EXTERN MQ_TOK libmqmsgque::MqServiceTokenGet ( MQ_CTX const ctx)

in an ongoing-service-call get the current MqContextC_ServiceApi_Identifer

This function is needed on the server to process a service-request defined as +ALL or as an alias to extract the current MqContextC_ServiceApi_Identifer.

Parameters
[in]ctxthe MqContextS instance to work on
Returns
the MqContextC_ServiceApi_Identifer
+ Here is the caller graph for this function: