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

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

+ Collaboration diagram for MqContextC_SendApi_Basics_PY_API:

Functions

static OT_ProcRet py_mqmsgque_MqContextC_SendEND (MqContextC_ARGS)
  Python: 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 py_mqmsgque_MqContextC_SendEND_AND_CALLBACK (MqContextC_ARGS)
  Python: 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 py_mqmsgque_MqContextC_SendEND_AND_SUB (MqContextC_ARGS)
  Python: 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 py_mqmsgque_MqContextC_SendEND_AND_TRANSACTION (MqContextC_ARGS)
  Python: 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 py_mqmsgque_MqContextC_SendEND_AND_WAIT (MqContextC_ARGS)
  Python: 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 py_mqmsgque_MqContextC_SendSTART (MqContextC_ARGS)
  Python: ctx.SendSTART() C-API
initialize the send-data-package. …
 
static OT_ProcRet py_mqmsgque_MqContextC_SendSYNC (MqContextC_ARGS)
  Python: 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

◆ py_mqmsgque_MqContextC_SendEND()

static OT_ProcRet py_mqmsgque_MqContextC_SendEND ( MqContextC_ARGS )
static

Python: 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 2759 of file MqContextC_py.c.

2759 {
2761 OT_SETUP_VARARGS(1,2,SendEND_doc)
2762 MQ_TOK token = 0;
2763 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
2764 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
2765 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
2766 OT_CHECK_NOARGS
2767 MkErrorC_Check(hdl,MqSendEND (hdl, token, timeout));
2768 OT_retObj_SET_None
2769 goto end;
2770 error:
2771 OT_retObj_SET_Error
2772 end:
2774}
#define OT_SETUP_hdl
#define SendEND_doc
#define OT_retObj_RETURN
#define error
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 …

◆ py_mqmsgque_MqContextC_SendEND_AND_CALLBACK()

static OT_ProcRet py_mqmsgque_MqContextC_SendEND_AND_CALLBACK ( MqContextC_ARGS )
static

Python: 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 2777 of file MqContextC_py.c.

2777 {
2779 OT_SETUP_VARARGS(2,3,SendEND_AND_CALLBACK_doc)
2780 MQ_TOK token = 0;
2781 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
2782 OT_SETUP_CALLABLE(callback)
2783 OT_CHECK_REQUIRED(OT_CHECK_CALLABLE(callback))
2784 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
2785 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
2786 OT_CHECK_NOARGS
2787 MkErrorC_Check(hdl,MqSendEND_AND_CALLBACK (hdl, token, NS(ServiceCall), callback, NS(ServiceFree), timeout));
2788 OT_retObj_SET_None
2789 goto end;
2790 error:
2791 OT_retObj_SET_Error
2792 end:
2793 OT_CLEANUP_CALLABLE(callback)
2795}
#define SendEND_AND_CALLBACK_doc
#define MqSendEND_AND_CALLBACK(...)

◆ py_mqmsgque_MqContextC_SendEND_AND_SUB()

static OT_ProcRet py_mqmsgque_MqContextC_SendEND_AND_SUB ( MqContextC_ARGS )
static

Python: 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 2798 of file MqContextC_py.c.

2798 {
2800 OT_SETUP_VARARGS(2,3,SendEND_AND_SUB_doc)
2801 MQ_TOK token = 0;
2802 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
2803 OT_SETUP_CALLABLE(callback)
2804 OT_CHECK_REQUIRED(OT_CHECK_CALLABLE(callback))
2805 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
2806 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
2807 OT_CHECK_NOARGS
2808 MkErrorC_Check(hdl,MqSendEND_AND_SUB (hdl, token, NS(ServiceCall), callback, NS(ServiceFree), timeout));
2809 OT_retObj_SET_None
2810 goto end;
2811 error:
2812 OT_retObj_SET_Error
2813 end:
2814 OT_CLEANUP_CALLABLE(callback)
2816}
#define SendEND_AND_SUB_doc
#define MqSendEND_AND_SUB(...)

◆ py_mqmsgque_MqContextC_SendEND_AND_TRANSACTION()

static OT_ProcRet py_mqmsgque_MqContextC_SendEND_AND_TRANSACTION ( MqContextC_ARGS )
static

Python: 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 2819 of file MqContextC_py.c.

2819 {
2821 OT_SETUP_VARARGS(2,3,SendEND_AND_TRANSACTION_doc)
2822 MQ_TOK token = 0;
2823 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
2824 MQ_TOK callback = 0;
2825 OT_CHECK_REQUIRED(OT_CHECK_STRN (callback))
2826 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
2827 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
2828 OT_CHECK_NOARGS
2829 MkErrorC_Check(hdl,MqSendEND_AND_TRANSACTION (hdl, token, callback, timeout));
2830 OT_retObj_SET_None
2831 goto end;
2832 error:
2833 OT_retObj_SET_Error
2834 end:
2836}
#define SendEND_AND_TRANSACTION_doc
#define MqSendEND_AND_TRANSACTION(...)

◆ py_mqmsgque_MqContextC_SendEND_AND_WAIT()

static OT_ProcRet py_mqmsgque_MqContextC_SendEND_AND_WAIT ( MqContextC_ARGS )
static

Python: 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 2839 of file MqContextC_py.c.

2839 {
2841 OT_SETUP_VARARGS(1,2,SendEND_AND_WAIT_doc)
2842 MQ_TOK token = 0;
2843 OT_CHECK_REQUIRED(OT_CHECK_STRN (token))
2844 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
2845 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
2846 OT_CHECK_NOARGS
2847 MkErrorC_Check(hdl,MqSendEND_AND_WAIT (hdl, token, timeout));
2848 OT_retObj_SET_None
2849 goto end;
2850 error:
2851 OT_retObj_SET_Error
2852 end:
2854}
#define SendEND_AND_WAIT_doc
#define MqSendEND_AND_WAIT(...)

◆ py_mqmsgque_MqContextC_SendSTART()

static OT_ProcRet py_mqmsgque_MqContextC_SendSTART ( MqContextC_ARGS )
static

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

Definition at line 2857 of file MqContextC_py.c.

2857 {
2859 OT_SETUP_NOARG(SendSTART_doc)
2860 OT_CHECK_NOARGS
2861 MkErrorC_Check(hdl,MqSendSTART (hdl));
2862 OT_retObj_SET_None
2863 goto end;
2864 error:
2865 OT_retObj_SET_Error
2866 end:
2868}
#define SendSTART_doc
#define MqSendSTART(...)

◆ py_mqmsgque_MqContextC_SendSYNC()

static OT_ProcRet py_mqmsgque_MqContextC_SendSYNC ( MqContextC_ARGS )
static

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

Definition at line 2871 of file MqContextC_py.c.

2871 {
2873 OT_SETUP_NOARG(SendSYNC_doc)
2874 OT_CHECK_NOARGS
2875 MkErrorC_Check(hdl,MqSendSYNC (hdl));
2876 OT_retObj_SET_None
2877 goto end;
2878 error:
2879 OT_retObj_SET_Error
2880 end:
2882}
#define SendSYNC_doc
#define MqSendSYNC(...)