theLink 10.0
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 HLWO on the server-link-setup

#include "LibMqMsgque_cc.hh"

using namespace ccmkkernel;
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::CcMqSetup();

  // 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);
  }
  return 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 HLWO on the server-link-setup

#include "LibMqMsgque_cc.hh"

using namespace ccmkkernel;
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::CcMqSetup();

  // 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);
  }
  return 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 1905 of file MqContextC_inline_cc.hh.

1905 {
1906 MK_UNUSED auto ctx = getCTX();
1907 const MK_STRN token_hdl = token.c_str();
1908 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
1909 enum MkErrorE errVal = MqServiceCreate(ctx, token_hdl, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
1910 MkErrorC_Check(ctx, errVal);
1911 }
#define MK_UNUSED
const MK_STRB * MK_STRN
#define MK_RT_CALL
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:57
static enum MkErrorE Call(MQ_SERVICE_CALL_ARGS)
Definition MqCall_cc.cc:78
static void Free(MQ_SERVICE_FREE_ARGS)
Definition MqCall_cc.cc:67

◆ 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 1922 of file MqContextC_inline_cc.hh.

1922 {
1923 MK_UNUSED auto ctx = getCTX();
1924 const MK_STRN token_hdl = token.c_str();
1925 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
1926 enum MkErrorE errVal = MqServiceCreate(ctx, token_hdl, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
1927 MkErrorC_Check(ctx, errVal);
1928 }

◆ 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 1939 of file MqContextC_inline_cc.hh.

1939 {
1940 MK_UNUSED auto ctx = getCTX();
1941 const MK_STRN token_hdl = token.c_str();
1942 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
1943 enum MkErrorE errVal = MqServiceCreate(ctx, token_hdl, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
1944 MkErrorC_Check(ctx, errVal);
1945 }

◆ 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 1897 of file MqContextC_inline_cc.hh.

1897 {
1898 MK_UNUSED auto ctx = getCTX();
1899 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
1900 enum MkErrorE errVal = MqServiceCreate(ctx, token, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
1901 MkErrorC_Check(ctx, errVal);
1902 }
+ 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 1914 of file MqContextC_inline_cc.hh.

1914 {
1915 MK_UNUSED auto ctx = getCTX();
1916 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
1917 enum MkErrorE errVal = MqServiceCreate(ctx, token, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
1918 MkErrorC_Check(ctx, errVal);
1919 }

◆ 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 1931 of file MqContextC_inline_cc.hh.

1931 {
1932 MK_UNUSED auto ctx = getCTX();
1933 auto callback_ptr = MqServiceCallbackC::Create(MK_RT_CALL callback, this);
1934 enum MkErrorE errVal = MqServiceCreate(ctx, token, MqServiceCallbackC::Call, callback_ptr, MqServiceCallbackC::Free, NULL);
1935 MkErrorC_Check(ctx, errVal);
1936 }

◆ 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 1955 of file MqContextC_inline_cc.hh.

1955 {
1956 MK_UNUSED auto ctx = getCTX();
1957 const MK_STRN token_hdl = token.c_str();
1958 enum MkErrorE errVal = MqServiceDelete(ctx, token_hdl);
1959 MkErrorC_Check(ctx, errVal);
1960 }
#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 1948 of file MqContextC_inline_cc.hh.

1948 {
1949 MK_UNUSED auto ctx = getCTX();
1950 enum MkErrorE errVal = MqServiceDelete(ctx, token);
1951 MkErrorC_Check(ctx, errVal);
1952 }

◆ 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 1963 of file MqContextC_inline_cc.hh.

1963 {
1964 MK_UNUSED auto ctx = getCTX();
1965 MK_BOOL __retVal__L = MqServiceIsTransaction(ctx);
1966 return __retVal__L;
1967 }
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 1977 of file MqContextC_inline_cc.hh.

1977 {
1978 MK_UNUSED auto ctx = getCTX();
1979 const MK_STRN token_hdl = token.c_str();
1980 enum MkErrorE errVal = MqServiceProxy(ctx, token_hdl, id);
1981 MkErrorC_Check(ctx, errVal);
1982 }
#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 1970 of file MqContextC_inline_cc.hh.

1970 {
1971 MK_UNUSED auto ctx = getCTX();
1972 enum MkErrorE errVal = MqServiceProxy(ctx, token, id);
1973 MkErrorC_Check(ctx, errVal);
1974 }
+ 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 2010 of file MqContextC_inline_cc.hh.

2010 {
2011 MK_UNUSED auto ctx = getCTX();
2012 const MK_STRN token_hdl = token.c_str();
2013 const MQ_CTX target_hdl = MqContextC::getCTX(target);
2014 enum MkErrorE errVal = MqServiceProxyCtx(ctx, token_hdl, target_hdl);
2015 MkErrorC_Check(ctx, errVal);
2016 }
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 2001 of file MqContextC_inline_cc.hh.

2001 {
2002 MK_UNUSED auto ctx = getCTX();
2003 const MK_STRN token_hdl = token.c_str();
2004 MQ_CTX target_hdl = MqContextC::getCTX(target);
2005 enum MkErrorE errVal = MqServiceProxyCtx(ctx, token_hdl, target_hdl);
2006 MkErrorC_Check(ctx, errVal);
2007 }

◆ 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 1993 of file MqContextC_inline_cc.hh.

1993 {
1994 MK_UNUSED auto ctx = getCTX();
1995 const MQ_CTX target_hdl = MqContextC::getCTX(target);
1996 enum MkErrorE errVal = MqServiceProxyCtx(ctx, token, target_hdl);
1997 MkErrorC_Check(ctx, errVal);
1998 }

◆ 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 1985 of file MqContextC_inline_cc.hh.

1985 {
1986 MK_UNUSED auto ctx = getCTX();
1987 MQ_CTX target_hdl = MqContextC::getCTX(target);
1988 enum MkErrorE errVal = MqServiceProxyCtx(ctx, token, target_hdl);
1989 MkErrorC_Check(ctx, errVal);
1990 }

◆ 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 2044 of file MqContextC_inline_cc.hh.

2044 {
2045 MK_UNUSED auto ctx = getCTX();
2046 const MK_STRN token_hdl = token.c_str();
2047 const MQ_CTX target_hdl = MqContextC::getCTX(target);
2048 MK_BOOL __retVal__L = MqServiceProxyCtxExists(ctx, token_hdl, target_hdl);
2049 return __retVal__L;
2050 }
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 2035 of file MqContextC_inline_cc.hh.

2035 {
2036 MK_UNUSED auto ctx = getCTX();
2037 const MK_STRN token_hdl = token.c_str();
2038 MQ_CTX target_hdl = MqContextC::getCTX(target);
2039 MK_BOOL __retVal__L = MqServiceProxyCtxExists(ctx, token_hdl, target_hdl);
2040 return __retVal__L;
2041 }

◆ 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 2027 of file MqContextC_inline_cc.hh.

2027 {
2028 MK_UNUSED auto ctx = getCTX();
2029 const MQ_CTX target_hdl = MqContextC::getCTX(target);
2030 MK_BOOL __retVal__L = MqServiceProxyCtxExists(ctx, token, target_hdl);
2031 return __retVal__L;
2032 }

◆ 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 2019 of file MqContextC_inline_cc.hh.

2019 {
2020 MK_UNUSED auto ctx = getCTX();
2021 MQ_CTX target_hdl = MqContextC::getCTX(target);
2022 MK_BOOL __retVal__L = MqServiceProxyCtxExists(ctx, token, target_hdl);
2023 return __retVal__L;
2024 }

◆ 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 2060 of file MqContextC_inline_cc.hh.

2060 {
2061 MK_UNUSED auto ctx = getCTX();
2062 const MK_STRN token_hdl = token.c_str();
2063 const MK_STRN ident_hdl = ident.c_str();
2064 enum MkErrorE errVal = MqServiceProxyRoundRobin(ctx, token_hdl, ident_hdl);
2065 MkErrorC_Check(ctx, errVal);
2066 }
#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 2053 of file MqContextC_inline_cc.hh.

2053 {
2054 MK_UNUSED auto ctx = getCTX();
2055 enum MkErrorE errVal = MqServiceProxyRoundRobin(ctx, token, ident);
2056 MkErrorC_Check(ctx, errVal);
2057 }

◆ 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 2076 of file MqContextC_inline_cc.hh.

2076 {
2077 MK_UNUSED auto ctx = getCTX();
2078 const MK_STRN token_hdl = token.c_str();
2079 enum MkErrorE errVal = MqServiceStorage(ctx, token_hdl);
2080 MkErrorC_Check(ctx, errVal);
2081 }
#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 2069 of file MqContextC_inline_cc.hh.

2069 {
2070 MK_UNUSED auto ctx = getCTX();
2071 enum MkErrorE errVal = MqServiceStorage(ctx, token);
2072 MkErrorC_Check(ctx, errVal);
2073 }
+ 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 2091 of file MqContextC_inline_cc.hh.

2091 {
2092 MK_UNUSED auto ctx = getCTX();
2093 const MK_STRN token_hdl = token.c_str();
2094 MK_BOOL __retVal__L = MqServiceTokenCheck(ctx, token_hdl);
2095 return __retVal__L;
2096 }
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 2084 of file MqContextC_inline_cc.hh.

2084 {
2085 MK_UNUSED auto ctx = getCTX();
2086 MK_BOOL __retVal__L = MqServiceTokenCheck(ctx, token);
2087 return __retVal__L;
2088 }

◆ 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 2106 of file MqContextC_inline_cc.hh.

2106 {
2107 MK_UNUSED auto ctx = getCTX();
2108 const MK_STRN token_hdl = token.c_str();
2109 MK_BOOL __retVal__L = MqServiceTokenExists(ctx, token_hdl);
2110 return __retVal__L;
2111 }
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 2099 of file MqContextC_inline_cc.hh.

2099 {
2100 MK_UNUSED auto ctx = getCTX();
2101 MK_BOOL __retVal__L = MqServiceTokenExists(ctx, token);
2102 return __retVal__L;
2103 }

◆ 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 2114 of file MqContextC_inline_cc.hh.

2114 {
2115 MK_UNUSED auto ctx = getCTX();
2116 MQ_TOK __retVal__L = MqServiceTokenGet(ctx);
2117 return __retVal__L;
2118 }
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 …