theLink 10.0
Loading...
Searching...
No Matches
MqContextC_SendApi_Basics_RB_API

MqContextC - finish the send-data-block and call synchronous/asynchronous a remote-serviceMore...

+ Collaboration diagram for MqContextC_SendApi_Basics_RB_API:

Functions

static OT_ProcRet rbmqmsgque_MqContextC_SendEND (MqContextC_ARGS)
  Ruby: ctx.SendEND(token:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
MqContextC - finish the send-data-block and call synchronous/asynchronous a remote-service
 
static OT_ProcRet rbmqmsgque_MqContextC_SendEND_AND_CALLBACK (MqContextC_ARGS)
  Ruby: ctx.SendEND_AND_CALLBACK(token:string[4], callback:callable, ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
finish the send-data-block, call the remote service, do not-wait for the result but expect the result on a callback
 
static OT_ProcRet rbmqmsgque_MqContextC_SendEND_AND_SUB (MqContextC_ARGS)
  Ruby: ctx.SendEND_AND_SUB(token:string[4], callback:callable, ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
finish the send-data-block, call the remote service, do wait for the result and expect multiple sub-results on a callback
 
static OT_ProcRet rbmqmsgque_MqContextC_SendEND_AND_TRANSACTION (MqContextC_ARGS)
  Ruby: ctx.SendEND_AND_TRANSACTION(token:string[4], callback:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
finish the send-data-block, call the remote service to do a longterm-transaction-call
 
static OT_ProcRet rbmqmsgque_MqContextC_SendEND_AND_WAIT (MqContextC_ARGS)
  Ruby: ctx.SendEND_AND_WAIT(token:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
finish the send-data-block, call the remote service and wait for result…
 
static OT_ProcRet rbmqmsgque_MqContextC_SendSTART (MqContextC_ARGS)
  Ruby: ctx.SendSTART() C-API
initialize the send-data-package. …
 
static OT_ProcRet rbmqmsgque_MqContextC_SendSYNC (MqContextC_ARGS)
  Ruby: ctx.SendSYNC() C-API
garantee that all pending asynchronous-service-calls are processed. …
 

Detailed Description

MqContextC - finish the send-data-block and call synchronous/asynchronous a remote-service

calling a remote service and wait timeout seconds for an result. If timeout == 0 it is an asynchronous-service-call and if the timeout > 0 it is a synchronous-service-call.

service-call blocking timeout
synchronous yes timeout > 0
asynchronous no timeout == 0

blocking mean waiting max timeout seconds to finishing the service-call:

If an error was raised on the server during the service-processing… the following error-handling will be available

  1. on a synchronous-service-call the error will be the result of the service-call
  2. on a asynchronous-service-call with callback the error will be the result of the callback
  3. on a asynchronous-service-call without callback the error will be send asynchronous from the server to the client . On the client the error will be raised on the NEXT event-handlng-command or as background-error if the MqSetupS::BgError function was defined.
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]timeoutin seconds until a timeout-error is raised (possible values like ProcessEvent) (MK_TIMEOUT_DEFAULT=0)
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
See also
MqSendSYNC

Function Documentation

◆ rbmqmsgque_MqContextC_SendEND()

static OT_ProcRet rbmqmsgque_MqContextC_SendEND ( MqContextC_ARGS )
static

Ruby: ctx.SendEND(token:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
MqContextC - finish the send-data-block and call synchronous/asynchronous a remote-service

Definition at line 2303 of file MqContextC_rb.c.

2303 {
2306 MQ_TOK token = 0;
2313 end: MK_UNUSED /* LONG JUMP on error */
2315}
#define OT_SETUP_VARARGS(min, max, d)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_RETURN
#define OT_CHECK_OPTIONAL(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_CHECK_STRN(val)
#define OT_SETUP_hdl
#define SendEND_doc
#define MK_UNUSED
MK_TIMEOUT_DEFAULT
time_t MK_TIME_T
#define MqSendEND(...)
MK_STRN MQ_TOK
MqContextC - a char[4+1] or hex[8+1] string used to unique identify a service …
MK_STRB token[9]
Definition high_lng.h:229
MK_TIME_T timeout
Definition high_lng.h:133
#define OT_CHECK_TIME_T(val)

◆ rbmqmsgque_MqContextC_SendEND_AND_CALLBACK()

static OT_ProcRet rbmqmsgque_MqContextC_SendEND_AND_CALLBACK ( MqContextC_ARGS )
static

Ruby: ctx.SendEND_AND_CALLBACK(token:string[4], callback:callable, ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
finish the send-data-block, call the remote service, do not-wait for the result but expect the result on a callback

Definition at line 2318 of file MqContextC_rb.c.

2318 {
2321 MQ_TOK token = 0;
2323 OT_SETUP_CALLABLE(callback)
2328 MkErrorC_Check(hdl,MqSendEND_AND_CALLBACK (hdl, token, NS(ServiceCall), callback, NS(ServiceFree), timeout));
2330 end: MK_UNUSED /* LONG JUMP on error */
2331 OT_CLEANUP_CALLABLE(callback)
2333}
#define NS(n)
#define SendEND_AND_CALLBACK_doc
#define MqSendEND_AND_CALLBACK(...)
#define OT_CHECK_CALLABLE(val)
#define OT_CLEANUP_CALLABLE(val)
#define OT_SETUP_CALLABLE(val)

◆ rbmqmsgque_MqContextC_SendEND_AND_SUB()

static OT_ProcRet rbmqmsgque_MqContextC_SendEND_AND_SUB ( MqContextC_ARGS )
static

Ruby: ctx.SendEND_AND_SUB(token:string[4], callback:callable, ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
finish the send-data-block, call the remote service, do wait for the result and expect multiple sub-results on a callback

Definition at line 2336 of file MqContextC_rb.c.

2336 {
2339 MQ_TOK token = 0;
2341 OT_SETUP_CALLABLE(callback)
2346 MkErrorC_Check(hdl,MqSendEND_AND_SUB (hdl, token, NS(ServiceCall), callback, NS(ServiceFree), timeout));
2348 end: MK_UNUSED /* LONG JUMP on error */
2349 OT_CLEANUP_CALLABLE(callback)
2351}
#define SendEND_AND_SUB_doc
#define MqSendEND_AND_SUB(...)

◆ rbmqmsgque_MqContextC_SendEND_AND_TRANSACTION()

static OT_ProcRet rbmqmsgque_MqContextC_SendEND_AND_TRANSACTION ( MqContextC_ARGS )
static

Ruby: ctx.SendEND_AND_TRANSACTION(token:string[4], callback:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
finish the send-data-block, call the remote service to do a longterm-transaction-call

Definition at line 2354 of file MqContextC_rb.c.

2354 {
2357 MQ_TOK token = 0;
2359 MQ_TOK callback = 0;
2366 end: MK_UNUSED /* LONG JUMP on error */
2368}
#define SendEND_AND_TRANSACTION_doc
#define MqSendEND_AND_TRANSACTION(...)

◆ rbmqmsgque_MqContextC_SendEND_AND_WAIT()

static OT_ProcRet rbmqmsgque_MqContextC_SendEND_AND_WAIT ( MqContextC_ARGS )
static

Ruby: ctx.SendEND_AND_WAIT(token:string[4], ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
finish the send-data-block, call the remote service and wait for result…

Definition at line 2371 of file MqContextC_rb.c.

2371 {
2374 MQ_TOK token = 0;
2381 end: MK_UNUSED /* LONG JUMP on error */
2383}
#define SendEND_AND_WAIT_doc
#define MqSendEND_AND_WAIT(...)

◆ rbmqmsgque_MqContextC_SendSTART()

static OT_ProcRet rbmqmsgque_MqContextC_SendSTART ( MqContextC_ARGS )
static

Ruby: ctx.SendSTART() C-API
initialize the send-data-package. …

Definition at line 2386 of file MqContextC_rb.c.

2386 {
2390 MkErrorC_Check(hdl,MqSendSTART (hdl));
2392 end: MK_UNUSED /* LONG JUMP on error */
2394}
#define OT_SETUP_NOARG(d)
#define SendSTART_doc
#define MqSendSTART(...)

◆ rbmqmsgque_MqContextC_SendSYNC()

static OT_ProcRet rbmqmsgque_MqContextC_SendSYNC ( MqContextC_ARGS )
static

Ruby: ctx.SendSYNC() C-API
garantee that all pending asynchronous-service-calls are processed. …

Definition at line 2397 of file MqContextC_rb.c.

2397 {
2401 MkErrorC_Check(hdl,MqSendSYNC (hdl));
2403 end: MK_UNUSED /* LONG JUMP on error */
2405}
#define SendSYNC_doc
#define MqSendSYNC(...)