11#define META_FILE_NAME "LibMqMsgque_jv.c"
13#include "jni_h/jvmqmsgque_MqMsgque.h"
14#include "LibMqMsgque_private_jv.h"
21#define defClass(v,n) jclass v;
22#define defOAtr(v,c,n,s) jfieldID v;
23#define defSAtr(v,c,n,s) jfieldID v;
24#define defOMth(v,c,n,s) jmethodID v;
25#define defSMth(v,c,n,s) jmethodID v;
36#define MqCleanupTmpl()
52 MkErrorC_Check(NULL, errVal)
53 jobject __retVal__S = MK(pGetEnumFromString)(env,MQ(Class_MqIdentE),
"Ljvmqmsgque/MqIdentE;",
MqIdentE_ToString(value_out));
64 MkErrorC_Check(NULL, errVal)
65 jobject __retVal__S = MK(pGetEnumFromString)(env,MQ(Class_MqSlaveE),
"Ljvmqmsgque/MqSlaveE;",
MqSlaveE_ToString(value_out));
76 MkErrorC_Check(NULL, errVal)
77 jobject __retVal__S = MK(pGetEnumFromString)(env,MQ(Class_MqStartE),
"Ljvmqmsgque/MqStartE;",
MqStartE_ToString(value_out));
88 MkErrorC_Check(NULL, errVal)
89 jobject __retVal__S = MK(pGetEnumFlagFromInt)(env,MQ(Class_MqStatusIsEF),value_out);
100 MkErrorC_Check(NULL, errVal)
101 jobject __retVal__S = MK(pGetEnumFromString)(env,MQ(Class_MqWaitOnEventE),
"Ljvmqmsgque/MqWaitOnEventE;",
MqWaitOnEventE_ToString(value_out));
112 enum MqIdentE value_e = MK(pGetEnumFromObj)(env, NS(Class_MqIdentE), value);
115 jint __retVal__S = __retVal__L;
124 enum MqIdentE value_e = MK(pGetEnumFromObj)(env, NS(Class_MqIdentE), value);
127 jstring __retVal__S = JC2O(env,__retVal__L);
136 enum MqSlaveE value_e = MK(pGetEnumFromObj)(env, NS(Class_MqSlaveE), value);
139 jint __retVal__S = __retVal__L;
148 enum MqSlaveE value_e = MK(pGetEnumFromObj)(env, NS(Class_MqSlaveE), value);
151 jstring __retVal__S = JC2O(env,__retVal__L);
160 enum MqStartE value_e = MK(pGetEnumFromObj)(env, NS(Class_MqStartE), value);
163 jint __retVal__S = __retVal__L;
172 enum MqStartE value_e = MK(pGetEnumFromObj)(env, NS(Class_MqStartE), value);
175 jstring __retVal__S = JC2O(env,__retVal__L);
184 enum MqStatusIsEF value_e = MK(pGetEnumFromObj)(env, NS(Class_MqStatusIsEF), value);
187 jint __retVal__S = __retVal__L;
196 enum MqStatusIsEF value_e = MK(pGetEnumFromObj)(env, NS(Class_MqStatusIsEF), value);
199 jstring __retVal__S = JC2O(env,__retVal__L);
208 enum MqWaitOnEventE value_e = MK(pGetEnumFromObj)(env, NS(Class_MqWaitOnEventE), value);
211 jint __retVal__S = __retVal__L;
220 enum MqWaitOnEventE value_e = MK(pGetEnumFromObj)(env, NS(Class_MqWaitOnEventE), value);
223 jstring __retVal__S = JC2O(env,__retVal__L);
241 MK_STRN tool_ptr = (tool?(*env)->GetStringUTFChars(env,tool,NULL):NULL);
244 jstring __retVal__S = JC2O(env,__retVal__L);
245 if (tool_ptr) (*env)->ReleaseStringUTFChars(env,tool,tool_ptr);
255 jstring __retVal__S = JC2O(env,__retVal__L);
272 jobject __retVal__S = MK(MkBufferListC_ObjNew)(
MK_RT_CALL env,__retVal__L);
280 jobject __retVal__S = MK(MkBufferListC_ObjNew)(
MK_RT_CALL env,__retVal__L);
310JNIEXPORT
void JNICALL
Setup (JNIEnv *env, jclass
class) {
323#ifdef META_THREAD_POOL
326 (JNIEnv * env, jclass cls, jlong mainL)
353 jobject runnableO = (*env)->CallStaticObjectMethod(env, MQ(Class_MqMsgque), MQ(MID_Thread_Pipe_callback), (jlong) argP);
355 if((*env)->ExceptionCheck(env) == JNI_TRUE) {
356 OT_ERROR_LNG_2_META(ctx);
361 idP->val = (
MK_IDNT) (*env)->NewWeakGlobalRef(env,runnableO);
362 idP->setByExtern =
true;
365 (*env)->CallStaticObjectMethod(env, MQ(Class_MqMsgque), MQ(MID_Thread_Work_callback), (jlong) argP);
367 if((*env)->ExceptionCheck(env) == JNI_TRUE) {
368 OT_ERROR_LNG_2_META(ctx);
422JNIEXPORT jint JNICALL
423JNI_OnLoad(JavaVM *jvm,
void *reserved)
427 JavaErrorCheck0 ((*jvm)->GetEnv(jvm, (
void*) &env, JNI_VERSION_10));
435 JavaErrorCheck0 ((*env)->EnsureLocalCapacity(env, 50));
438 #define check(v,c) if ((v=(c))==NULL) return JNI_ERR
439#define defClass(v,n) check(cls, (*env)->FindClass(env, n));\
441 check(v, (*env)->NewGlobalRef(env, cls)); \
443#define defOAtr(v,c,n,s) check(v, (*env)->GetFieldID(env,c,n,s)); \
445#define defSAtr(v,c,n,s) check(v, (*env)->GetStaticFieldID(env,c,n,s)); \
447#define defOMth(v,c,n,s) check(v, (*env)->GetMethodID(env,c,n,s)); \
449#define defSMth(v,c,n,s) check(v, (*env)->GetStaticMethodID(env,c,n,s)); \
465#ifdef META_THREAD_POOL
470 return JNI_VERSION_10;
475JNIEXPORT
void JNICALL
476JNI_OnUnload(JavaVM *jvm,
void *reserved)
480 if ((*jvm)->GetEnv(jvm, &val, JNI_VERSION_10)) {
490#define defClass(v,n) (*env)->DeleteGlobalRef(env, v);
491#define defOAtr(v,c,n,s)
492#define defSAtr(v,c,n,s)
493#define defOMth(v,c,n,s)
494#define defSMth(v,c,n,s)
JNIEXPORT void JNICALL Java_jvmqmsgque_MqMsgque_MqSysServerThreadMain(JNIEnv *env, jclass cls, jlong mainL)
static struct MkRuntimeCallbackS sMqRuntimeCallback
struct MkBufferListS * MK_BAC
#define MkErrorStack_0E_Check()
#define MkErrorSetV_1E(printfmt,...)
void MkSysPipeHandler(MkSysPipeHandlerE keepPipe)
size_t MkRuntimeCallbackAdd(MK_RT mkrt, MkRuntimeCallbackS *cbdata, MkRuntimeInitF rt_callback, MK_STRN ident)
void MkRuntimeCallbackDel(MK_RT mkrt, MkRuntimeCallbackS *cbdata)
static MK_I32 MqStartE_ToInt(enum MqStartE value)
return the MqStartE as integer …
static MK_I32 MqIdentE_ToInt(enum MqIdentE value)
return the MqIdentE as integer …
MK_STRN MqWaitOnEventE_ToString(enum MqWaitOnEventE value)
return the MqWaitOnEventE as string …
static MK_I32 MqStatusIsEF_ToInt(enum MqStatusIsEF value)
return the MqStatusIsEF as integer …
enum MkErrorE MqStartE_FromInt(MK_I32 const value, enum MqStartE *value_out)
return the MqStartE from integer …
enum MkErrorE MqIdentE_FromInt(MK_I32 const value, enum MqIdentE *value_out)
return the MqIdentE from integer …
MqWaitOnEventE
wait for an event? …
MqSlaveE
predefined slave-id for well known slaves …
MK_STRN MqStatusIsEF_ToString(enum MqStatusIsEF value)
return the MqStatusIsEF as string …
enum MkErrorE MqSlaveE_FromInt(MK_I32 const value, enum MqSlaveE *value_out)
return the MqSlaveE from integer …
MqIdentE
identify the application using prefix (default) or factory …
MK_STRN MqSlaveE_ToString(enum MqSlaveE value)
return the MqSlaveE as string …
MqStartE
User preferences on HOWTO start a new entity.
MqStatusIsEF
Information about how the context was created.
MK_STRN MqIdentE_ToString(enum MqIdentE value)
return the MqIdentE as string …
MK_STRN MqStartE_ToString(enum MqStartE value)
return the MqStartE as string …
enum MkErrorE MqStatusIsEF_FromInt(MK_I32 const value, enum MqStatusIsEF *value_out)
return the MqStatusIsEF from integer …
static MK_I32 MqWaitOnEventE_ToInt(enum MqWaitOnEventE value)
return the MqWaitOnEventE as integer …
static MK_I32 MqSlaveE_ToInt(enum MqSlaveE value)
return the MqSlaveE as integer …
enum MkErrorE MqWaitOnEventE_FromInt(MK_I32 const value, enum MqWaitOnEventE *value_out)
return the MqWaitOnEventE from integer …
JNIEXPORT jint JNICALL Java_jvmqmsgque_MqMsgque_IdentE_1ToInt(JNIEnv *env, jclass class, jobject value)
Java: [static] int IdentE_ToInt(MqIdentE value) → C-API return the MqIdentE as integer …
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqMsgque_StartE_1FromInt(JNIEnv *env, jclass class, jint value)
Java: [static] MqStartE StartE_FromInt(int value) → C-API return the MqStartE from integer …
JNIEXPORT jstring JNICALL Java_jvmqmsgque_MqMsgque_StartE_1ToString(JNIEnv *env, jclass class, jobject value)
Java: [static] String StartE_ToString(MqStartE value) → C-API return the MqStartE as string …
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqMsgque_IdentE_1FromInt(JNIEnv *env, jclass class, jint value)
Java: [static] MqIdentE IdentE_FromInt(int value) → C-API return the MqIdentE from integer …
JNIEXPORT jint JNICALL Java_jvmqmsgque_MqMsgque_SlaveE_1ToInt(JNIEnv *env, jclass class, jobject value)
Java: [static] int SlaveE_ToInt(MqSlaveE value) → C-API return the MqSlaveE as integer …
JNIEXPORT jstring JNICALL Java_jvmqmsgque_MqMsgque_StatusIsEF_1ToString(JNIEnv *env, jclass class, jobject value)
Java: [static] String StatusIsEF_ToString(MqStatusIsEF value) → C-API return the MqStatusIsEF as...
JNIEXPORT jstring JNICALL Java_jvmqmsgque_MqMsgque_IdentE_1ToString(JNIEnv *env, jclass class, jobject value)
Java: [static] String IdentE_ToString(MqIdentE value) → C-API return the MqIdentE as string …
JNIEXPORT jint JNICALL Java_jvmqmsgque_MqMsgque_WaitOnEventE_1ToInt(JNIEnv *env, jclass class, jobject value)
Java: [static] int WaitOnEventE_ToInt(MqWaitOnEventE value) → C-API return the MqWaitOnEventE as...
JNIEXPORT jint JNICALL Java_jvmqmsgque_MqMsgque_StatusIsEF_1ToInt(JNIEnv *env, jclass class, jobject value)
Java: [static] int StatusIsEF_ToInt(MqStatusIsEF value) → C-API return the MqStatusIsEF as integ...
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqMsgque_SlaveE_1FromInt(JNIEnv *env, jclass class, jint value)
Java: [static] MqSlaveE SlaveE_FromInt(int value) → C-API return the MqSlaveE from integer …
JNIEXPORT jstring JNICALL Java_jvmqmsgque_MqMsgque_WaitOnEventE_1ToString(JNIEnv *env, jclass class, jobject value)
Java: [static] String WaitOnEventE_ToString(MqWaitOnEventE value) → C-API return the MqWaitOnEve...
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqMsgque_WaitOnEventE_1FromInt(JNIEnv *env, jclass class, jint value)
Java: [static] MqWaitOnEventE WaitOnEventE_FromInt(int value) → C-API return the MqWaitOnEventE ...
JNIEXPORT jint JNICALL Java_jvmqmsgque_MqMsgque_StartE_1ToInt(JNIEnv *env, jclass class, jobject value)
Java: [static] int StartE_ToInt(MqStartE value) → C-API return the MqStartE as integer …
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqMsgque_StatusIsEF_1FromInt(JNIEnv *env, jclass class, jint value)
Java: [static] MqStatusIsEF StatusIsEF_FromInt(int value) → C-API return the MqStatusIsEF from i...
JNIEXPORT jstring JNICALL Java_jvmqmsgque_MqMsgque_SlaveE_1ToString(JNIEnv *env, jclass class, jobject value)
Java: [static] String SlaveE_ToString(MqSlaveE value) → C-API return the MqSlaveE as string …
MK_STR MqHelp(MK_STRN tool)
write jvmqmsgque specific user-help to stderr
MK_STR MqHelpMsgque(void)
return a page with the usage of all jvmqmsgque specific options
JNIEXPORT jstring JNICALL Java_jvmqmsgque_MqMsgque_Help(JNIEnv *env, jclass class, jstring tool)
Java: [static] String Help(String tool) → C-API write jvmqmsgque specific user-help to stderr
JNIEXPORT jstring JNICALL Java_jvmqmsgque_MqMsgque_HelpMsgque(JNIEnv *env, jclass class)
Java: [static] String HelpMsgque() → C-API return a page with the usage of all jvmqmsgque specif...
MK_BFL MqInitGetArg0(void)
get the process startup-prefix argument
MK_BFL MqInitResetArg0(void)
Reset the process-startup-prefix argument to an empty list …
void MqInitSetArg0(MK_BAC bfl)
set the process startup-prefix argument to bfl
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqMsgque_InitGetArg0(JNIEnv *env, jclass class)
Java: [static] MkBufferListC InitGetArg0() → C-API get the process startup-prefix argument
JNIEXPORT void JNICALL Java_jvmqmsgque_MqMsgque_InitSetArg0(JNIEnv *env, jclass class, jobject bfl)
Java: [static] InitSetArg0(?MkBufferListC bfl = null?) → C-API set the process startup-prefix ar...
JNIEXPORT jobject JNICALL Java_jvmqmsgque_MqMsgque_InitResetArg0(JNIEnv *env, jclass class)
Java: [static] MkBufferListC InitResetArg0() → C-API Reset the process-startup-prefix argument t...
void MqCleanup(void)
cleanup jvmqmsgque internal memory …
void MqSetup(void)
setup jvmqmsgque internal memory …
JNIEXPORT void JNICALL Setup(JNIEnv *env, jclass class)
Java: [static] Setup() → C-API setup jvmqmsgque internal memory …
JNIEXPORT void JNICALL Java_jvmqmsgque_MqMsgque_Cleanup(JNIEnv *env, jclass class)
Java: [static] Cleanup() → C-API cleanup jvmqmsgque internal memory …
void MqSysServerThreadMain(struct MqSysServerThreadMainS *data)
initialize a new thread …
struct MqLalS MqLal
Language Abstraction Layer in duty.
bool MqRuntimeThreadPoolUse
PUBLIC data structure for the jvmqmsgque-specific-data
MqSysServerThreadF MqSysServerThreadCB
thread server create syscall with jvmqmsgque error plugin
data used to initialize a new created thread …