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

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

+ Collaboration diagram for MqContextC_Service_CC_API:

Functions

void ccmqmsgque::MqContextC::ServiceCreate (MQ_TOK token, MqServiceCCB callback)
  C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback
 
void ccmqmsgque::MqContextC::ServiceCreate (const std::string &token, MqServiceCCB callback)
  C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback
 
void ccmqmsgque::MqContextC::ServiceCreate (MQ_TOK token, MqServiceICB callback)
  C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback
 
void ccmqmsgque::MqContextC::ServiceCreate (const std::string &token, MqServiceICB callback)
  C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback
 
void ccmqmsgque::MqContextC::ServiceCreate (MQ_TOK token, MqServiceIF *callback)
  C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback
 
void ccmqmsgque::MqContextC::ServiceCreate (const std::string &token, MqServiceIF *callback)
  C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback
 
void ccmqmsgque::MqContextC::ServiceDelete (MQ_TOK token)
  C++: ctx.ServiceDelete(MQ_TOK token) C-API
delete a service. …
 
void ccmqmsgque::MqContextC::ServiceDelete (const std::string &token)
  C++: ctx.ServiceDelete(MQ_TOK token) C-API
delete a service. …
 
MK_BOOL ccmqmsgque::MqContextC::ServiceIsTransaction ()
  C++: MK_BOOL ctx.ServiceIsTransaction() C-API
check if the ongoing-service-call belongs to a transaction …
 
void ccmqmsgque::MqContextC::ServiceProxy (MQ_TOK token, MQ_SLAVE_ID id=MQ_SLAVE_OTHER)
  C++: ctx.ServiceProxy(MQ_TOK token, MQ_SLAVE_ID id = MQ_SLAVE_OTHER) C-API
create a service to link a master-context with a slave-context. …
 
void ccmqmsgque::MqContextC::ServiceProxy (const std::string &token, MQ_SLAVE_ID id=MQ_SLAVE_OTHER)
  C++: ctx.ServiceProxy(MQ_TOK token, MQ_SLAVE_ID id = MQ_SLAVE_OTHER) C-API
create a service to link a master-context with a slave-context. …
 
void ccmqmsgque::MqContextC::ServiceProxyCtx (MQ_TOK token, MqContextC *target)
  C++: ctx.ServiceProxyCtx(MQ_TOK token, MqContextC* target) C-API
same as MqServiceProxy but use an MqContextC as input.
 
void ccmqmsgque::MqContextC::ServiceProxyCtx (MQ_TOK token, const MqContextC &target)
  C++: ctx.ServiceProxyCtx(MQ_TOK token, MqContextC* target) C-API
same as MqServiceProxy but use an MqContextC as input.
 
void ccmqmsgque::MqContextC::ServiceProxyCtx (const std::string &token, MqContextC *target)
  C++: ctx.ServiceProxyCtx(MQ_TOK token, MqContextC* target) C-API
same as MqServiceProxy but use an MqContextC as input.
 
void ccmqmsgque::MqContextC::ServiceProxyCtx (const std::string &token, const MqContextC &target)
  C++: ctx.ServiceProxyCtx(MQ_TOK token, MqContextC* target) C-API
same as MqServiceProxy but use an MqContextC as input.
 
MK_BOOL ccmqmsgque::MqContextC::ServiceProxyCtxExists (MQ_TOK token, MqContextC *target)
  C++: MK_BOOL ctx.ServiceProxyCtxExists(MQ_TOK token, MqContextC* target) C-API
check if service who belongs to token is a proxy-service
 
MK_BOOL ccmqmsgque::MqContextC::ServiceProxyCtxExists (MQ_TOK token, const MqContextC &target)
  C++: MK_BOOL ctx.ServiceProxyCtxExists(MQ_TOK token, MqContextC* target) C-API
check if service who belongs to token is a proxy-service
 
MK_BOOL ccmqmsgque::MqContextC::ServiceProxyCtxExists (const std::string &token, MqContextC *target)
  C++: MK_BOOL ctx.ServiceProxyCtxExists(MQ_TOK token, MqContextC* target) C-API
check if service who belongs to token is a proxy-service
 
MK_BOOL ccmqmsgque::MqContextC::ServiceProxyCtxExists (const std::string &token, const MqContextC &target)
  C++: MK_BOOL ctx.ServiceProxyCtxExists(MQ_TOK token, MqContextC* target) C-API
check if service who belongs to token is a proxy-service
 
void ccmqmsgque::MqContextC::ServiceProxyRoundRobin (MQ_TOK token, MK_STRN ident)
  C++: ctx.ServiceProxyRoundRobin(MQ_TOK token, MK_STRN ident) C-API
create a proxy-service using Round-Robin as load-balancer …
 
void ccmqmsgque::MqContextC::ServiceProxyRoundRobin (const std::string &token, const std::string &ident)
  C++: ctx.ServiceProxyRoundRobin(MQ_TOK token, MK_STRN ident) C-API
create a proxy-service using Round-Robin as load-balancer …
 
void ccmqmsgque::MqContextC::ServiceStorage (MQ_TOK token)
  C++: ctx.ServiceStorage(MQ_TOK token) C-API
setup a service listen on a MqContextC_ServiceApi_Identifer and save all read-data-package into the STORAGE
 
void ccmqmsgque::MqContextC::ServiceStorage (const std::string &token)
  C++: ctx.ServiceStorage(MQ_TOK token) C-API
setup a service listen on a MqContextC_ServiceApi_Identifer and save all read-data-package into the STORAGE
 
MK_BOOL ccmqmsgque::MqContextC::ServiceTokenCheck (MQ_TOK token)
  C++: MK_BOOL ctx.ServiceTokenCheck(MQ_TOK token) C-API
in an ongoing-service-call check if the current MqContextC_ServiceApi_Identifer is token
 
MK_BOOL ccmqmsgque::MqContextC::ServiceTokenCheck (const std::string &token)
  C++: MK_BOOL ctx.ServiceTokenCheck(MQ_TOK token) C-API
in an ongoing-service-call check if the current MqContextC_ServiceApi_Identifer is token
 
MK_BOOL ccmqmsgque::MqContextC::ServiceTokenExists (MQ_TOK token)
  C++: MK_BOOL ctx.ServiceTokenExists(MQ_TOK token) C-API
check if the MqContextC_ServiceApi_Identifer token is defined as ctx service …
 
MK_BOOL ccmqmsgque::MqContextC::ServiceTokenExists (const std::string &token)
  C++: MK_BOOL ctx.ServiceTokenExists(MQ_TOK token) C-API
check if the MqContextC_ServiceApi_Identifer token is defined as ctx service …
 
MQ_TOK ccmqmsgque::MqContextC::ServiceTokenGet ()
  C++: MQ_TOK ctx.ServiceTokenGet() C-API
in an ongoing-service-call get the current MqContextC_ServiceApi_Identifer
 

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 MqServerSetupIF method and finally cleanup with MqServerCleanupIF.

‍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 MqServerSetupIF {
  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();
}

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 MqServerSetupIF method and finally cleanup with MqServerCleanupIF.

‍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 MqServerSetupIF {
  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();
}

Function Documentation

◆ ServiceCreate() [1/6]

void ccmqmsgque::MqContextC::ServiceCreate ( const std::string & token,
MqServiceCCB callback )
inline

C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback

Definition at line 2108 of file MqContextC_inline_cc.hh.

2108 {
2109 MK_UNUSED auto ctx = getCTX();
2110 MkRtSetup_X(ctx);
2111 const MK_STRN token_hdl = token.c_str();
2112 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
2113 enum MkErrorE errVal = MqServiceCreate(ctx, token_hdl, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
2114 MkErrorC_Check(ctx, errVal);
2115 }
#define MK_UNUSED
const MK_STRB * MK_STRN
#define MK_RT_CALL
#define MkRtSetup_X(x)
MQ_CTX getCTX() const
return the LibMsgqueObject from current MqContextC instance
#define MqServiceCreate(...)
static MK_CBP Create(MK_RT mkrt, MqContextC::MqTokenICB const callback, MqContextC *self=NULL)
Definition MqCall_cc.hh:60
static enum MkErrorE Call(MQ_SERVICE_CALL_ARGS)
Definition MqCall_cc.cc:81
static void Free(MQ_SERVICE_FREE_ARGS)
Definition MqCall_cc.cc:70

◆ ServiceCreate() [2/6]

void ccmqmsgque::MqContextC::ServiceCreate ( const std::string & token,
MqServiceICB callback )
inline

C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback

Definition at line 2127 of file MqContextC_inline_cc.hh.

2127 {
2128 MK_UNUSED auto ctx = getCTX();
2129 MkRtSetup_X(ctx);
2130 const MK_STRN token_hdl = token.c_str();
2131 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
2132 enum MkErrorE errVal = MqServiceCreate(ctx, token_hdl, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
2133 MkErrorC_Check(ctx, errVal);
2134 }

◆ ServiceCreate() [3/6]

void ccmqmsgque::MqContextC::ServiceCreate ( const std::string & token,
MqServiceIF * callback )
inline

C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback

Definition at line 2146 of file MqContextC_inline_cc.hh.

2146 {
2147 MK_UNUSED auto ctx = getCTX();
2148 MkRtSetup_X(ctx);
2149 const MK_STRN token_hdl = token.c_str();
2150 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
2151 enum MkErrorE errVal = MqServiceCreate(ctx, token_hdl, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
2152 MkErrorC_Check(ctx, errVal);
2153 }

◆ ServiceCreate() [4/6]

void ccmqmsgque::MqContextC::ServiceCreate ( MQ_TOK token,
MqServiceCCB callback )
inline

C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback

Definition at line 2099 of file MqContextC_inline_cc.hh.

2099 {
2100 MK_UNUSED auto ctx = getCTX();
2101 MkRtSetup_X(ctx);
2102 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
2103 enum MkErrorE errVal = MqServiceCreate(ctx, token, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
2104 MkErrorC_Check(ctx, errVal);
2105 }
+ Here is the caller graph for this function:

◆ ServiceCreate() [5/6]

void ccmqmsgque::MqContextC::ServiceCreate ( MQ_TOK token,
MqServiceICB callback )
inline

C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback

Definition at line 2118 of file MqContextC_inline_cc.hh.

2118 {
2119 MK_UNUSED auto ctx = getCTX();
2120 MkRtSetup_X(ctx);
2121 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
2122 enum MkErrorE errVal = MqServiceCreate(ctx, token, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
2123 MkErrorC_Check(ctx, errVal);
2124 }

◆ ServiceCreate() [6/6]

void ccmqmsgque::MqContextC::ServiceCreate ( MQ_TOK token,
MqServiceIF * callback )
inline

C++: ctx.ServiceCreate(MQ_TOK token, MqServiceICB MqServiceCCB MqServiceIF* callback) C-API
create a link between a service-token and a service-callback

Definition at line 2137 of file MqContextC_inline_cc.hh.

2137 {
2138 MK_UNUSED auto ctx = getCTX();
2139 MkRtSetup_X(ctx);
2140 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
2141 enum MkErrorE errVal = MqServiceCreate(ctx, token, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
2142 MkErrorC_Check(ctx, errVal);
2143 }

◆ ServiceDelete() [1/2]

void ccmqmsgque::MqContextC::ServiceDelete ( const std::string & token)
inline

C++: ctx.ServiceDelete(MQ_TOK token) C-API
delete a service. …

Definition at line 2164 of file MqContextC_inline_cc.hh.

2164 {
2165 MK_UNUSED auto ctx = getCTX();
2166 MkRtSetup_X(ctx);
2167 const MK_STRN token_hdl = token.c_str();
2168 enum MkErrorE errVal = MqServiceDelete(ctx, token_hdl);
2169 MkErrorC_Check(ctx, errVal);
2170 }
#define MqServiceDelete(...)

◆ ServiceDelete() [2/2]

void ccmqmsgque::MqContextC::ServiceDelete ( MQ_TOK token)
inline

C++: ctx.ServiceDelete(MQ_TOK token) C-API
delete a service. …

Definition at line 2156 of file MqContextC_inline_cc.hh.

2156 {
2157 MK_UNUSED auto ctx = getCTX();
2158 MkRtSetup_X(ctx);
2159 enum MkErrorE errVal = MqServiceDelete(ctx, token);
2160 MkErrorC_Check(ctx, errVal);
2161 }

◆ ServiceIsTransaction()

MK_BOOL ccmqmsgque::MqContextC::ServiceIsTransaction ( )
inline

C++: MK_BOOL ctx.ServiceIsTransaction() C-API
check if the ongoing-service-call belongs to a transaction …

Definition at line 2173 of file MqContextC_inline_cc.hh.

2173 {
2174 MK_UNUSED auto ctx = getCTX();
2175 MkRtSetup_X(ctx);
2176 MK_BOOL __retVal__L = MqServiceIsTransaction(ctx);
2177 return __retVal__L;
2178 }
static bool MqServiceIsTransaction(MQ_CTX const ctx)
check if the ongoing-service-call belongs to a transaction …

◆ ServiceProxy() [1/2]

void ccmqmsgque::MqContextC::ServiceProxy ( const std::string & token,
MQ_SLAVE_ID id = MQ_SLAVE_OTHER )
inline

C++: ctx.ServiceProxy(MQ_TOK token, MQ_SLAVE_ID id = MQ_SLAVE_OTHER) C-API
create a service to link a master-context with a slave-context. …

Definition at line 2189 of file MqContextC_inline_cc.hh.

2189 {
2190 MK_UNUSED auto ctx = getCTX();
2191 MkRtSetup_X(ctx);
2192 const MK_STRN token_hdl = token.c_str();
2193 enum MkErrorE errVal = MqServiceProxy(ctx, token_hdl, id);
2194 MkErrorC_Check(ctx, errVal);
2195 }
#define MqServiceProxy(...)

◆ ServiceProxy() [2/2]

void ccmqmsgque::MqContextC::ServiceProxy ( MQ_TOK token,
MQ_SLAVE_ID id = MQ_SLAVE_OTHER )
inline

C++: ctx.ServiceProxy(MQ_TOK token, MQ_SLAVE_ID id = MQ_SLAVE_OTHER) C-API
create a service to link a master-context with a slave-context. …

Definition at line 2181 of file MqContextC_inline_cc.hh.

2181 {
2182 MK_UNUSED auto ctx = getCTX();
2183 MkRtSetup_X(ctx);
2184 enum MkErrorE errVal = MqServiceProxy(ctx, token, id);
2185 MkErrorC_Check(ctx, errVal);
2186 }
+ Here is the caller graph for this function:

◆ ServiceProxyCtx() [1/4]

void ccmqmsgque::MqContextC::ServiceProxyCtx ( const std::string & token,
const MqContextC & target )
inline

C++: ctx.ServiceProxyCtx(MQ_TOK token, MqContextC* target) C-API
same as MqServiceProxy but use an MqContextC as input.

Definition at line 2226 of file MqContextC_inline_cc.hh.

2226 {
2227 MK_UNUSED auto ctx = getCTX();
2228 MkRtSetup_X(ctx);
2229 const MK_STRN token_hdl = token.c_str();
2230 const MQ_CTX target_hdl = MqContextC::getCTX(target);
2231 enum MkErrorE errVal = MqServiceProxyCtx(ctx, token_hdl, target_hdl);
2232 MkErrorC_Check(ctx, errVal);
2233 }
struct MqContextS * MQ_CTX
class-shortcut for struct MqContextS *, all shortcut using the XX_YYY syntax (only for public API) …
#define MqServiceProxyCtx(...)

◆ ServiceProxyCtx() [2/4]

void ccmqmsgque::MqContextC::ServiceProxyCtx ( const std::string & token,
MqContextC * target )
inline

C++: ctx.ServiceProxyCtx(MQ_TOK token, MqContextC* target) C-API
same as MqServiceProxy but use an MqContextC as input.

Definition at line 2216 of file MqContextC_inline_cc.hh.

2216 {
2217 MK_UNUSED auto ctx = getCTX();
2218 MkRtSetup_X(ctx);
2219 const MK_STRN token_hdl = token.c_str();
2220 MQ_CTX target_hdl = MqContextC::getCTX(target);
2221 enum MkErrorE errVal = MqServiceProxyCtx(ctx, token_hdl, target_hdl);
2222 MkErrorC_Check(ctx, errVal);
2223 }

◆ ServiceProxyCtx() [3/4]

void ccmqmsgque::MqContextC::ServiceProxyCtx ( MQ_TOK token,
const MqContextC & target )
inline

C++: ctx.ServiceProxyCtx(MQ_TOK token, MqContextC* target) C-API
same as MqServiceProxy but use an MqContextC as input.

Definition at line 2207 of file MqContextC_inline_cc.hh.

2207 {
2208 MK_UNUSED auto ctx = getCTX();
2209 MkRtSetup_X(ctx);
2210 const MQ_CTX target_hdl = MqContextC::getCTX(target);
2211 enum MkErrorE errVal = MqServiceProxyCtx(ctx, token, target_hdl);
2212 MkErrorC_Check(ctx, errVal);
2213 }

◆ ServiceProxyCtx() [4/4]

void ccmqmsgque::MqContextC::ServiceProxyCtx ( MQ_TOK token,
MqContextC * target )
inline

C++: ctx.ServiceProxyCtx(MQ_TOK token, MqContextC* target) C-API
same as MqServiceProxy but use an MqContextC as input.

Definition at line 2198 of file MqContextC_inline_cc.hh.

2198 {
2199 MK_UNUSED auto ctx = getCTX();
2200 MkRtSetup_X(ctx);
2201 MQ_CTX target_hdl = MqContextC::getCTX(target);
2202 enum MkErrorE errVal = MqServiceProxyCtx(ctx, token, target_hdl);
2203 MkErrorC_Check(ctx, errVal);
2204 }

◆ ServiceProxyCtxExists() [1/4]

MK_BOOL ccmqmsgque::MqContextC::ServiceProxyCtxExists ( const std::string & token,
const MqContextC & target )
inline

C++: MK_BOOL ctx.ServiceProxyCtxExists(MQ_TOK token, MqContextC* target) C-API
check if service who belongs to token is a proxy-service

Definition at line 2264 of file MqContextC_inline_cc.hh.

2264 {
2265 MK_UNUSED auto ctx = getCTX();
2266 MkRtSetup_X(ctx);
2267 const MK_STRN token_hdl = token.c_str();
2268 const MQ_CTX target_hdl = MqContextC::getCTX(target);
2269 MK_BOOL __retVal__L = MqServiceProxyCtxExists(ctx, token_hdl, target_hdl);
2270 return __retVal__L;
2271 }
bool MqServiceProxyCtxExists(MQ_CTX const ctx, MQ_TOK const token, MQ_CTX const target)
check if service who belongs to token is a proxy-service

◆ ServiceProxyCtxExists() [2/4]

MK_BOOL ccmqmsgque::MqContextC::ServiceProxyCtxExists ( const std::string & token,
MqContextC * target )
inline

C++: MK_BOOL ctx.ServiceProxyCtxExists(MQ_TOK token, MqContextC* target) C-API
check if service who belongs to token is a proxy-service

Definition at line 2254 of file MqContextC_inline_cc.hh.

2254 {
2255 MK_UNUSED auto ctx = getCTX();
2256 MkRtSetup_X(ctx);
2257 const MK_STRN token_hdl = token.c_str();
2258 MQ_CTX target_hdl = MqContextC::getCTX(target);
2259 MK_BOOL __retVal__L = MqServiceProxyCtxExists(ctx, token_hdl, target_hdl);
2260 return __retVal__L;
2261 }

◆ ServiceProxyCtxExists() [3/4]

MK_BOOL ccmqmsgque::MqContextC::ServiceProxyCtxExists ( MQ_TOK token,
const MqContextC & target )
inline

C++: MK_BOOL ctx.ServiceProxyCtxExists(MQ_TOK token, MqContextC* target) C-API
check if service who belongs to token is a proxy-service

Definition at line 2245 of file MqContextC_inline_cc.hh.

2245 {
2246 MK_UNUSED auto ctx = getCTX();
2247 MkRtSetup_X(ctx);
2248 const MQ_CTX target_hdl = MqContextC::getCTX(target);
2249 MK_BOOL __retVal__L = MqServiceProxyCtxExists(ctx, token, target_hdl);
2250 return __retVal__L;
2251 }

◆ ServiceProxyCtxExists() [4/4]

MK_BOOL ccmqmsgque::MqContextC::ServiceProxyCtxExists ( MQ_TOK token,
MqContextC * target )
inline

C++: MK_BOOL ctx.ServiceProxyCtxExists(MQ_TOK token, MqContextC* target) C-API
check if service who belongs to token is a proxy-service

Definition at line 2236 of file MqContextC_inline_cc.hh.

2236 {
2237 MK_UNUSED auto ctx = getCTX();
2238 MkRtSetup_X(ctx);
2239 MQ_CTX target_hdl = MqContextC::getCTX(target);
2240 MK_BOOL __retVal__L = MqServiceProxyCtxExists(ctx, token, target_hdl);
2241 return __retVal__L;
2242 }

◆ ServiceProxyRoundRobin() [1/2]

void ccmqmsgque::MqContextC::ServiceProxyRoundRobin ( const std::string & token,
const std::string & ident )
inline

C++: ctx.ServiceProxyRoundRobin(MQ_TOK token, MK_STRN ident) C-API
create a proxy-service using Round-Robin as load-balancer …

Definition at line 2282 of file MqContextC_inline_cc.hh.

2282 {
2283 MK_UNUSED auto ctx = getCTX();
2284 MkRtSetup_X(ctx);
2285 const MK_STRN token_hdl = token.c_str();
2286 const MK_STRN ident_hdl = ident.c_str();
2287 enum MkErrorE errVal = MqServiceProxyRoundRobin(ctx, token_hdl, ident_hdl);
2288 MkErrorC_Check(ctx, errVal);
2289 }
#define MqServiceProxyRoundRobin(...)

◆ ServiceProxyRoundRobin() [2/2]

void ccmqmsgque::MqContextC::ServiceProxyRoundRobin ( MQ_TOK token,
MK_STRN ident )
inline

C++: ctx.ServiceProxyRoundRobin(MQ_TOK token, MK_STRN ident) C-API
create a proxy-service using Round-Robin as load-balancer …

Definition at line 2274 of file MqContextC_inline_cc.hh.

2274 {
2275 MK_UNUSED auto ctx = getCTX();
2276 MkRtSetup_X(ctx);
2277 enum MkErrorE errVal = MqServiceProxyRoundRobin(ctx, token, ident);
2278 MkErrorC_Check(ctx, errVal);
2279 }

◆ ServiceStorage() [1/2]

void ccmqmsgque::MqContextC::ServiceStorage ( const std::string & token)
inline

C++: ctx.ServiceStorage(MQ_TOK token) C-API
setup a service listen on a MqContextC_ServiceApi_Identifer and save all read-data-package into the STORAGE

Definition at line 2300 of file MqContextC_inline_cc.hh.

2300 {
2301 MK_UNUSED auto ctx = getCTX();
2302 MkRtSetup_X(ctx);
2303 const MK_STRN token_hdl = token.c_str();
2304 enum MkErrorE errVal = MqServiceStorage(ctx, token_hdl);
2305 MkErrorC_Check(ctx, errVal);
2306 }
#define MqServiceStorage(...)

◆ ServiceStorage() [2/2]

void ccmqmsgque::MqContextC::ServiceStorage ( MQ_TOK token)
inline

C++: ctx.ServiceStorage(MQ_TOK token) C-API
setup a service listen on a MqContextC_ServiceApi_Identifer and save all read-data-package into the STORAGE

Definition at line 2292 of file MqContextC_inline_cc.hh.

2292 {
2293 MK_UNUSED auto ctx = getCTX();
2294 MkRtSetup_X(ctx);
2295 enum MkErrorE errVal = MqServiceStorage(ctx, token);
2296 MkErrorC_Check(ctx, errVal);
2297 }
+ Here is the caller graph for this function:

◆ ServiceTokenCheck() [1/2]

MK_BOOL ccmqmsgque::MqContextC::ServiceTokenCheck ( const std::string & token)
inline

C++: MK_BOOL ctx.ServiceTokenCheck(MQ_TOK token) C-API
in an ongoing-service-call check if the current MqContextC_ServiceApi_Identifer is token

Definition at line 2317 of file MqContextC_inline_cc.hh.

2317 {
2318 MK_UNUSED auto ctx = getCTX();
2319 MkRtSetup_X(ctx);
2320 const MK_STRN token_hdl = token.c_str();
2321 MK_BOOL __retVal__L = MqServiceTokenCheck(ctx, token_hdl);
2322 return __retVal__L;
2323 }
bool MqServiceTokenCheck(MQ_CTX const ctx, MQ_TOK const token)
in an ongoing-service-call check if the current MqContextC_ServiceApi_Identifer is token …

◆ ServiceTokenCheck() [2/2]

MK_BOOL ccmqmsgque::MqContextC::ServiceTokenCheck ( MQ_TOK token)
inline

C++: MK_BOOL ctx.ServiceTokenCheck(MQ_TOK token) C-API
in an ongoing-service-call check if the current MqContextC_ServiceApi_Identifer is token

Definition at line 2309 of file MqContextC_inline_cc.hh.

2309 {
2310 MK_UNUSED auto ctx = getCTX();
2311 MkRtSetup_X(ctx);
2312 MK_BOOL __retVal__L = MqServiceTokenCheck(ctx, token);
2313 return __retVal__L;
2314 }

◆ ServiceTokenExists() [1/2]

MK_BOOL ccmqmsgque::MqContextC::ServiceTokenExists ( const std::string & token)
inline

C++: MK_BOOL ctx.ServiceTokenExists(MQ_TOK token) C-API
check if the MqContextC_ServiceApi_Identifer token is defined as ctx service …

Definition at line 2334 of file MqContextC_inline_cc.hh.

2334 {
2335 MK_UNUSED auto ctx = getCTX();
2336 MkRtSetup_X(ctx);
2337 const MK_STRN token_hdl = token.c_str();
2338 MK_BOOL __retVal__L = MqServiceTokenExists(ctx, token_hdl);
2339 return __retVal__L;
2340 }
bool MqServiceTokenExists(MQ_CTX const ctx, MQ_TOK const token)
check if the MqContextC_ServiceApi_Identifer token is defined as ctx service …

◆ ServiceTokenExists() [2/2]

MK_BOOL ccmqmsgque::MqContextC::ServiceTokenExists ( MQ_TOK token)
inline

C++: MK_BOOL ctx.ServiceTokenExists(MQ_TOK token) C-API
check if the MqContextC_ServiceApi_Identifer token is defined as ctx service …

Definition at line 2326 of file MqContextC_inline_cc.hh.

2326 {
2327 MK_UNUSED auto ctx = getCTX();
2328 MkRtSetup_X(ctx);
2329 MK_BOOL __retVal__L = MqServiceTokenExists(ctx, token);
2330 return __retVal__L;
2331 }

◆ ServiceTokenGet()

MQ_TOK ccmqmsgque::MqContextC::ServiceTokenGet ( )
inline

C++: MQ_TOK ctx.ServiceTokenGet() C-API
in an ongoing-service-call get the current MqContextC_ServiceApi_Identifer

Definition at line 2343 of file MqContextC_inline_cc.hh.

2343 {
2344 MK_UNUSED auto ctx = getCTX();
2345 MkRtSetup_X(ctx);
2346 MQ_TOK __retVal__L = MqServiceTokenGet(ctx);
2347 return __retVal__L;
2348 }
MK_STRN MQ_TOK
MqContextC - a char[4+1] or hex[8+1] string used to unique identify a service …
MQ_TOK MqServiceTokenGet(MQ_CTX const ctx)
in an ongoing-service-call get the current MqContextC_ServiceApi_Identifer …