theLink 10.0
Loading...
Searching...
No Matches
MqContextC_Proxy_CS_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_CS_API:

Functions

void csmqmsgque.MqContextC.ProxyForward (MqContextC targetCtx, MqDumpC dump=null, long timeout=(long) MkTimeoutE.DEFAULT)
  C#: sourceCtx.ProxyForward(MqContextC targetCtx, MqDumpC dump = null, long timeout = (long)MkTimeoutE.DEFAULT) C-API
send the entire read-data-package-data to the link-target
 
void csmqmsgque.MqContextC.ProxyItem (MqContextC targetCtx)
  C#: sourceCtx.ProxyItem(MqContextC targetCtx) 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
}
void ProxyItem(MqContextC targetCtx)
C#: sourceCtx.ProxyItem(MqContextC targetCtx) → C-API Copy a single-data-item from the sourceCt...
bool ReadItemExists()
C#: bool ctx.ReadItemExists() → C-API check if an item exists in the read-data-package …
void SendSTART()
C#: ctx.SendSTART() → C-API initialize the send-data-package. …
void SendRETURN()
C#: ctx.SendRETURN() → C-API MqContextC - finish the send-data-block on the server and optional...
MqContextC SlaveGetFilter()
C#: MqContextC ctx.SlaveGetFilter() → C-API get the filter-ctx or the master-ctx …

Function Documentation

◆ ProxyForward()

void csmqmsgque.MqContextC.ProxyForward ( MqContextC targetCtx,
MqDumpC dump = null,
long timeout = (long)MkTimeoutE::DEFAULT )
inline

C#: sourceCtx.ProxyForward(MqContextC targetCtx, MqDumpC dump = null, long timeout = (long)MkTimeoutE.DEFAULT) C-API
send the entire read-data-package-data to the link-target

Definition at line 955 of file MqContextC.cs.

955 {
956 IntPtr targetCtx_hdl = MqContextC.getOBJ("MqContextC",targetCtx);
957 IntPtr dump_hdl = MqDumpC.getOBJ_null_allow(dump);
958 MkErrorE errVal = Mq.MqProxyForward(mkrt, hdl, targetCtx_hdl, dump_hdl, timeout);
959 MkErrorC.Check(hdl, errVal);
960 }
csmqmsgque.MqMsgque Mq
static void Check(IntPtr ctx, MkErrorE err)
MkErrorE

◆ ProxyItem()

void csmqmsgque.MqContextC.ProxyItem ( MqContextC targetCtx)
inline

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

Definition at line 963 of file MqContextC.cs.

963 {
964 IntPtr targetCtx_hdl = MqContextC.getOBJ("MqContextC",targetCtx);
965 MkErrorE errVal = Mq.MqProxyItem(mkrt, hdl, targetCtx_hdl);
966 MkErrorC.Check(hdl, errVal);
967 }