theLink 10.0
Loading...
Searching...
No Matches
MqContextC_SendApi_Basics_JV_API

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

+ Collaboration diagram for MqContextC_SendApi_Basics_JV_API:

Functions

native void jvmqmsgque.MqContextC.SendEND (String token, long timeout)
  Java: ctx.SendEND(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
MqContextC - finish the send-data-block and call synchronous/asynchronous a remote-service
 
void jvmqmsgque.MqContextC.SendEND (String token)
  Java: ctx.SendEND(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
MqContextC - finish the send-data-block and call synchronous/asynchronous a remote-service
 
native void jvmqmsgque.MqContextC.SendEND_AND_CALLBACK (String token, MqServiceIF callback, long timeout)
  Java: ctx.SendEND_AND_CALLBACK(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service, do not-wait for the result but expect the result on a callback
 
void jvmqmsgque.MqContextC.SendEND_AND_CALLBACK (String token, MqServiceIF callback)
  Java: ctx.SendEND_AND_CALLBACK(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service, do not-wait for the result but expect the result on a callback
 
native void jvmqmsgque.MqContextC.SendEND_AND_SUB (String token, MqServiceIF callback, long timeout)
  Java: ctx.SendEND_AND_SUB(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service, do wait for the result and expect multiple sub-results on a callback
 
void jvmqmsgque.MqContextC.SendEND_AND_SUB (String token, MqServiceIF callback)
  Java: ctx.SendEND_AND_SUB(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service, do wait for the result and expect multiple sub-results on a callback
 
native void jvmqmsgque.MqContextC.SendEND_AND_TRANSACTION (String token, String callback, long timeout)
  Java: ctx.SendEND_AND_TRANSACTION(String token, String callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service to do a longterm-transaction-call
 
void jvmqmsgque.MqContextC.SendEND_AND_TRANSACTION (String token, String callback)
  Java: ctx.SendEND_AND_TRANSACTION(String token, String callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service to do a longterm-transaction-call
 
native void jvmqmsgque.MqContextC.SendEND_AND_WAIT (String token, long timeout)
  Java: ctx.SendEND_AND_WAIT(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service and wait for result…
 
void jvmqmsgque.MqContextC.SendEND_AND_WAIT (String token)
  Java: ctx.SendEND_AND_WAIT(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service and wait for result…
 
native void jvmqmsgque.MqContextC.SendSTART ()
  Java: ctx.SendSTART() C-API
initialize the send-data-package. …
 
native void jvmqmsgque.MqContextC.SendSYNC ()
  Java: ctx.SendSYNC() C-API
garantee that all pending asynchronous-service-calls are processed. …
 
JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendEND (JNIEnv *env, jobject self, jstring token, jlong timeout)
  Java: ctx.SendEND(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
MqContextC - finish the send-data-block and call synchronous/asynchronous a remote-service
 
JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendEND_1AND_1CALLBACK (JNIEnv *env, jobject self, jstring token, jobject callback, jlong timeout)
  Java: ctx.SendEND_AND_CALLBACK(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service, do not-wait for the result but expect the result on a callback
 
JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendEND_1AND_1SUB (JNIEnv *env, jobject self, jstring token, jobject callback, jlong timeout)
  Java: ctx.SendEND_AND_SUB(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service, do wait for the result and expect multiple sub-results on a callback
 
JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendEND_1AND_1TRANSACTION (JNIEnv *env, jobject self, jstring token, jstring callback, jlong timeout)
  Java: ctx.SendEND_AND_TRANSACTION(String token, String callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service to do a longterm-transaction-call
 
JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendEND_1AND_1WAIT (JNIEnv *env, jobject self, jstring token, jlong timeout)
  Java: ctx.SendEND_AND_WAIT(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service and wait for result…
 
JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendSTART (JNIEnv *env, jobject self)
  Java: ctx.SendSTART() C-API
initialize the send-data-package. …
 
JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendSYNC (JNIEnv *env, jobject self)
  Java: 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

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

◆ Java_jvmqmsgque_MqContextC_SendEND()

JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendEND ( JNIEnv * env,
jobject self,
jstring token,
jlong timeout )

Java: ctx.SendEND(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
MqContextC - finish the send-data-block and call synchronous/asynchronous a remote-service

Definition at line 2002 of file MqContextC_jv.c.

2002 {
2003 MQ_CTX hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",self);
2004 JavaErrorCheck;
2005 MkRtSetup_X(hdl);
2006 MQ_TOK token_ptr = (token?(*env)->GetStringUTFChars(env,token,NULL):NULL);
2007 JavaErrorCheck;
2008 enum MkErrorE errVal = MqSendEND(hdl, token_ptr, timeout);
2009 MkErrorC_Check(hdl, errVal)
2010 if (token_ptr) (*env)->ReleaseStringUTFChars(env,token,token_ptr);
2011error:
2012 return;
2013}
MkErrorE
#define MkRtSetup_X(x)
struct MqContextS * MQ_CTX
class-shortcut for struct MqContextS *, all shortcut using the XX_YYY syntax (only for public API) …
#define MqSendEND(...)
MK_STRN MQ_TOK
MqContextC - a char[4+1] or hex[8+1] string used to unique identify a service …
PUBLIC data structure for the jvmqmsgque-specific-data

◆ Java_jvmqmsgque_MqContextC_SendEND_1AND_1CALLBACK()

JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendEND_1AND_1CALLBACK ( JNIEnv * env,
jobject self,
jstring token,
jobject callback,
jlong timeout )

Java: ctx.SendEND_AND_CALLBACK(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) 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 2016 of file MqContextC_jv.c.

2016 {
2017 MQ_CTX hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",self);
2018 JavaErrorCheck;
2019 MkRtSetup_X(hdl);
2020 MQ_TOK token_ptr = (token?(*env)->GetStringUTFChars(env,token,NULL):NULL);
2021 JavaErrorCheck;
2022 MK_CBP callback_ptr = MK(ProcCreate)(MK_RT_CALL env, callback, NULL, NS(MID_callback), true);
2023 JavaErrorCheck;
2024 enum MkErrorE errVal = MqSendEND_AND_CALLBACK(hdl, token_ptr, NS(ServiceCall), callback_ptr, NS(ServiceFree), timeout);
2025 MkErrorC_Check(hdl, errVal)
2026 if (token_ptr) (*env)->ReleaseStringUTFChars(env,token,token_ptr);
2027error:
2028 return;
2029}
MK_PTRB * MK_CBP
#define MK_RT_CALL
#define MqSendEND_AND_CALLBACK(...)

◆ Java_jvmqmsgque_MqContextC_SendEND_1AND_1SUB()

JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendEND_1AND_1SUB ( JNIEnv * env,
jobject self,
jstring token,
jobject callback,
jlong timeout )

Java: ctx.SendEND_AND_SUB(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) 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 2032 of file MqContextC_jv.c.

2032 {
2033 MQ_CTX hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",self);
2034 JavaErrorCheck;
2035 MkRtSetup_X(hdl);
2036 MQ_TOK token_ptr = (token?(*env)->GetStringUTFChars(env,token,NULL):NULL);
2037 JavaErrorCheck;
2038 MK_CBP callback_ptr = MK(ProcCreate)(MK_RT_CALL env, callback, NULL, NS(MID_callback), true);
2039 JavaErrorCheck;
2040 enum MkErrorE errVal = MqSendEND_AND_SUB(hdl, token_ptr, NS(ServiceCall), callback_ptr, NS(ServiceFree), timeout);
2041 MkErrorC_Check(hdl, errVal)
2042 if (token_ptr) (*env)->ReleaseStringUTFChars(env,token,token_ptr);
2043error:
2044 return;
2045}
#define MqSendEND_AND_SUB(...)

◆ Java_jvmqmsgque_MqContextC_SendEND_1AND_1TRANSACTION()

JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendEND_1AND_1TRANSACTION ( JNIEnv * env,
jobject self,
jstring token,
jstring callback,
jlong timeout )

Java: ctx.SendEND_AND_TRANSACTION(String token, String callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service to do a longterm-transaction-call

Definition at line 2048 of file MqContextC_jv.c.

2048 {
2049 MQ_CTX hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",self);
2050 JavaErrorCheck;
2051 MkRtSetup_X(hdl);
2052 MQ_TOK token_ptr = (token?(*env)->GetStringUTFChars(env,token,NULL):NULL);
2053 JavaErrorCheck;
2054 MQ_TOK callback_ptr = (callback?(*env)->GetStringUTFChars(env,callback,NULL):NULL);
2055 JavaErrorCheck;
2056 enum MkErrorE errVal = MqSendEND_AND_TRANSACTION(hdl, token_ptr, callback_ptr, timeout);
2057 MkErrorC_Check(hdl, errVal)
2058 if (token_ptr) (*env)->ReleaseStringUTFChars(env,token,token_ptr);
2059 if (callback_ptr) (*env)->ReleaseStringUTFChars(env,callback,callback_ptr);
2060error:
2061 return;
2062}
#define MqSendEND_AND_TRANSACTION(...)

◆ Java_jvmqmsgque_MqContextC_SendEND_1AND_1WAIT()

JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendEND_1AND_1WAIT ( JNIEnv * env,
jobject self,
jstring token,
jlong timeout )

Java: ctx.SendEND_AND_WAIT(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service and wait for result…

Definition at line 2065 of file MqContextC_jv.c.

2065 {
2066 MQ_CTX hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",self);
2067 JavaErrorCheck;
2068 MkRtSetup_X(hdl);
2069 MQ_TOK token_ptr = (token?(*env)->GetStringUTFChars(env,token,NULL):NULL);
2070 JavaErrorCheck;
2071 enum MkErrorE errVal = MqSendEND_AND_WAIT(hdl, token_ptr, timeout);
2072 MkErrorC_Check(hdl, errVal)
2073 if (token_ptr) (*env)->ReleaseStringUTFChars(env,token,token_ptr);
2074error:
2075 return;
2076}
#define MqSendEND_AND_WAIT(...)

◆ Java_jvmqmsgque_MqContextC_SendSTART()

JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendSTART ( JNIEnv * env,
jobject self )

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

Definition at line 2079 of file MqContextC_jv.c.

2079 {
2080 MQ_CTX hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",self);
2081 JavaErrorCheck;
2082 MkRtSetup_X(hdl);
2083 enum MkErrorE errVal = MqSendSTART(hdl);
2084 MkErrorC_Check(hdl, errVal)
2085error:
2086 return;
2087}
#define MqSendSTART(...)

◆ Java_jvmqmsgque_MqContextC_SendSYNC()

JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_SendSYNC ( JNIEnv * env,
jobject self )

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

Definition at line 2090 of file MqContextC_jv.c.

2090 {
2091 MQ_CTX hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",self);
2092 JavaErrorCheck;
2093 MkRtSetup_X(hdl);
2094 enum MkErrorE errVal = MqSendSYNC(hdl);
2095 MkErrorC_Check(hdl, errVal)
2096error:
2097 return;
2098}
#define MqSendSYNC(...)

◆ SendEND() [1/2]

void jvmqmsgque.MqContextC.SendEND ( String token)

Java: ctx.SendEND(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
MqContextC - finish the send-data-block and call synchronous/asynchronous a remote-service

Definition at line 892 of file MqContextC.java.

892 {
893 SendEND (token, MkTimeoutE.DEFAULT.get());
894 }
native void SendEND(String token, long timeout)
Java: ctx.SendEND(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) → C-API MqContextC -...

◆ SendEND() [2/2]

native void jvmqmsgque.MqContextC.SendEND ( String token,
long timeout )

Java: ctx.SendEND(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
MqContextC - finish the send-data-block and call synchronous/asynchronous a remote-service

+ Here is the caller graph for this function:

◆ SendEND_AND_CALLBACK() [1/2]

void jvmqmsgque.MqContextC.SendEND_AND_CALLBACK ( String token,
MqServiceIF callback )

Java: ctx.SendEND_AND_CALLBACK(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) 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 900 of file MqContextC.java.

900 {
901 SendEND_AND_CALLBACK (token, callback, MkTimeoutE.DEFAULT.get());
902 }
native void SendEND_AND_CALLBACK(String token, MqServiceIF callback, long timeout)
Java: ctx.SendEND_AND_CALLBACK(String token, MqServiceIF callback, ?long timeout = MkTimeoutE....

◆ SendEND_AND_CALLBACK() [2/2]

native void jvmqmsgque.MqContextC.SendEND_AND_CALLBACK ( String token,
MqServiceIF callback,
long timeout )

Java: ctx.SendEND_AND_CALLBACK(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service, do not-wait for the result but expect the result on a callback

+ Here is the caller graph for this function:

◆ SendEND_AND_SUB() [1/2]

void jvmqmsgque.MqContextC.SendEND_AND_SUB ( String token,
MqServiceIF callback )

Java: ctx.SendEND_AND_SUB(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) 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 908 of file MqContextC.java.

908 {
909 SendEND_AND_SUB (token, callback, MkTimeoutE.DEFAULT.get());
910 }
native void SendEND_AND_SUB(String token, MqServiceIF callback, long timeout)
Java: ctx.SendEND_AND_SUB(String token, MqServiceIF callback, ?long timeout = MkTimeoutE....

◆ SendEND_AND_SUB() [2/2]

native void jvmqmsgque.MqContextC.SendEND_AND_SUB ( String token,
MqServiceIF callback,
long timeout )

Java: ctx.SendEND_AND_SUB(String token, MqServiceIF callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service, do wait for the result and expect multiple sub-results on a callback

+ Here is the caller graph for this function:

◆ SendEND_AND_TRANSACTION() [1/2]

void jvmqmsgque.MqContextC.SendEND_AND_TRANSACTION ( String token,
String callback )

Java: ctx.SendEND_AND_TRANSACTION(String token, String callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service to do a longterm-transaction-call

Definition at line 916 of file MqContextC.java.

916 {
917 SendEND_AND_TRANSACTION (token, callback, MkTimeoutE.DEFAULT.get());
918 }
native void SendEND_AND_TRANSACTION(String token, String callback, long timeout)
Java: ctx.SendEND_AND_TRANSACTION(String token, String callback, ?long timeout = MkTimeoutE....

◆ SendEND_AND_TRANSACTION() [2/2]

native void jvmqmsgque.MqContextC.SendEND_AND_TRANSACTION ( String token,
String callback,
long timeout )

Java: ctx.SendEND_AND_TRANSACTION(String token, String callback, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service to do a longterm-transaction-call

+ Here is the caller graph for this function:

◆ SendEND_AND_WAIT() [1/2]

void jvmqmsgque.MqContextC.SendEND_AND_WAIT ( String token)

Java: ctx.SendEND_AND_WAIT(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service and wait for result…

Definition at line 924 of file MqContextC.java.

924 {
925 SendEND_AND_WAIT (token, MkTimeoutE.DEFAULT.get());
926 }
native void SendEND_AND_WAIT(String token, long timeout)
Java: ctx.SendEND_AND_WAIT(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?...

◆ SendEND_AND_WAIT() [2/2]

native void jvmqmsgque.MqContextC.SendEND_AND_WAIT ( String token,
long timeout )

Java: ctx.SendEND_AND_WAIT(String token, ?long timeout = MkTimeoutE.DEFAULT.get()?) C-API
finish the send-data-block, call the remote service and wait for result…

+ Here is the caller graph for this function:

◆ SendSTART()

native void jvmqmsgque.MqContextC.SendSTART ( )

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

◆ SendSYNC()

native void jvmqmsgque.MqContextC.SendSYNC ( )

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