Loading...
Searching...
No Matches
MqContextC_Proxy_PY_API

MqContextC - copy data from the read-data-package of the sourceCtx to the send-data-package of the targetCtx More...

+ Collaboration diagram for MqContextC_Proxy_PY_API:

Functions

static OT_ProcRet py_mqmsgque_MqContextC_ProxyForward (MqContextC_ARGS)
  Python: sourceCtx.ProxyForward(targetCtx:MqContextC, ?dump:MqDumpC=None?, ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
send the entire read-data-package-data to the link-target
 
static OT_ProcRet py_mqmsgque_MqContextC_ProxyItem (MqContextC_ARGS)
  Python: sourceCtx.ProxyItem(targetCtx:MqContextC) C-API
Copy a single-data-item from the sourceCtx to the targetCtx.
 

Detailed Description

MqContextC - copy data from the read-data-package of the sourceCtx to the send-data-package of the targetCtx

The proxy-feature is used in a filter-setup to process-and-forward incoming data.

See also
MqDumpC

Example: A typical proxy-setup in pseudo C++ code

void myService () {
MqContextC *ftr = SlaveGetFilter(); // get the "slave" with id "1" (the filter)
...
ftr->SendSTART(); // start the FORWARD
while (ReadItemExists()) { // read ALL data from the ORIGINAL service-call
ProxyItem(ftr); // forward a SINGEL item from "this" to "ftr"
}
...
ftr->SendEND_AND_WAIT("MYTK"); // send the data.package to "ftr"
...
SendSTART(); // start the ANSWER
while (ftr->ReadItemExists()) { // read ALL data from the "MYTK" service-call
ftr->ProxyItem(this); // forward a SINGEL item from "ftr" to "this"
}
SendRETURN(); // answer the ORIGINAL service call
}

Function Documentation

◆ py_mqmsgque_MqContextC_ProxyForward()

static OT_ProcRet py_mqmsgque_MqContextC_ProxyForward ( MqContextC_ARGS )
static

Python: sourceCtx.ProxyForward(targetCtx:MqContextC, ?dump:MqDumpC=None?, ?timeout:MkTimeoutE|int32=DEFAULT?) C-API
send the entire read-data-package-data to the link-target

Definition at line 1916 of file MqContextC_py.c.

1916 {
1918 OT_SETUP_VARARGS(1,3,ProxyForward_doc)
1919 MQ_CTX targetCtx = 0;
1920 OT_CHECK_REQUIRED(OT_CHECK_CTX (targetCtx,MK_NULL_NO))
1921 MQ_DMP dump = NULL;
1922 OT_CHECK_OPTIONAL(OT_CHECK_DMP (dump,MK_NULL_YES))
1923 MK_TIME_T timeout = MK_TIMEOUT_DEFAULT;
1924 OT_CHECK_OPTIONAL(OT_CHECK_TIME_T (timeout))
1925 OT_CHECK_NOARGS
1926 MkErrorC_Check(hdl,MqProxyForward (hdl, targetCtx, dump, timeout));
1927 OT_retObj_SET_None
1928 goto end;
1929 error:
1930 OT_retObj_SET_Error
1931 end:
1933}
#define ProxyForward_doc
#define OT_SETUP_hdl
#define OT_retObj_RETURN
#define error
#define MK_NULL_NO
#define MK_NULL_YES
MK_TIMEOUT_DEFAULT
time_t MK_TIME_T
#define MqProxyForward(...)
PUBLIC data structure for the pymqmsgque-specific-data
MqDumpC - the class known as dmp or dump is used to export a pymqmsgque data package as binary …

◆ py_mqmsgque_MqContextC_ProxyItem()

static OT_ProcRet py_mqmsgque_MqContextC_ProxyItem ( MqContextC_ARGS )
static

Python: sourceCtx.ProxyItem(targetCtx:MqContextC) C-API
Copy a single-data-item from the sourceCtx to the targetCtx.

Definition at line 1936 of file MqContextC_py.c.

1936 {
1938 OT_SETUP_ONEARG(ProxyItem_doc)
1939 MQ_CTX targetCtx = 0;
1940 OT_CHECK_REQUIRED(OT_CHECK_CTX (targetCtx,MK_NULL_NO))
1941 OT_CHECK_NOARGS
1942 MkErrorC_Check(hdl,MqProxyItem (hdl, targetCtx));
1943 OT_retObj_SET_None
1944 goto end;
1945 error:
1946 OT_retObj_SET_Error
1947 end:
1949}
#define ProxyItem_doc
#define MqProxyItem(...)