theLink 10.0
Loading...
Searching...
No Matches
MqHigh_jv.c File Reference

tag: nhi1-release-250425 More...

#include "jni_h/jvmqmsgque_MqContextC.h"
#include "LibMqMsgque_private_jv.h"
#include "tmpl/high_lng.h"
+ Include dependency graph for MqHigh_jv.c:

Go to the source code of this file.

Macros

#define META_CONTEXT_S   mqctx
 
#define JavaErrorCheck2   if ((*env)->ExceptionCheck(env) == JNI_TRUE) goto error_jv;
 
#define typeI8   MK_I8
 
#define typeBOL   MK_BOL
 
#define typeI16   MK_I16
 
#define typeI32   MK_I32
 
#define typeFLT   MK_FLT
 
#define typeI64   MK_I64
 
#define typeDBL   MK_DBL
 
#define typeSTR   MK_STRN
 
#define typeBIN   MK_BINN
 
#define typeBUF   MK_BUF
 
#define typeBFL   MK_BFL
 
#define typeHDL   MK_HDL
 
#define jniI8   jbyte
 
#define jniBOL   jboolean
 
#define jniI16   jshort
 
#define jniI32   jint
 
#define jniFLT   jfloat
 
#define jniI64   jlong
 
#define jniDBL   jdouble
 
#define jniHDL   jint
 
#define jniC   ???
 
#define jniB   ???
 
#define jniU   ???
 
#define jniL   ???
 
#define BLOCK_START(T)
 
#define BLOCK_END(T)
 
#define sendX1(T, TTT)
 
#define sendX2(T, ClassC)
 
#define highSELF   "Send"
 
#define mqctx   hdl
 
#define highSKIP   skip
 
#define highSKIP_SHIFT   0
 
#define highSIZE   objc
 
#define highSIZE_AVAILABLE   1
 
#define highREAD_RETURN_LIST   1
 
#define highREAD_HAS_REFERENCE   0
 
#define highTOKEN(s)
 
#define highTRAN(s)
 
#define highCALL(f)
 
#define highTIME(t)
 
#define highINITcstr   cstr = JO2C_START(env,jcallSig); JavaErrorCheck; /* callSig */
 
#define highCMD   "ctx.%s('%s', ..., '%s', ...)"
 
#define highFARGS(f)
 
#define OT_retObj_SET_None   retObj = NULL;
 
#define OT_retObj_SET_BUF(obj)
 
#define OT_retObj_SET_BFL(obj)
 
#define OT_MK_CALL_0(obj, cls, meth, ret)
 
#define highRETURN   highRETURN_type_S
 
#define highRETok   goto end
 
#define highERRORnative   if ((*env)->ExceptionCheck(env) == JNI_TRUE) OT_ERROR_LNG_2_META(mqctx);
 
#define highRETerror   OT_ERROR_META_2_LNG(hdl)
 
#define highSEND(T)
 
#define highSend_I8   highSEND(I8)
 
#define highSend_BOL   highSEND(BOL)
 
#define highSend_I16   highSEND(I16)
 
#define highSend_I32   highSEND(I32)
 
#define highSend_FLT   highSEND(FLT)
 
#define highSend_I64   highSEND(I64)
 
#define highSend_DBL   highSEND(DBL)
 
#define highSend_STR   highSEND(STR)
 
#define highSend_BUF   highSEND(BUF)
 
#define highSend_BFL   highSEND(BFL)
 
#define highSend_BIN   highSEND(BIN)
 
#define highSend_HDL   highSEND(HDL)
 
#define highREADprepare
 
#define highREADinit   /* readNUM++; */
 
#define HighErrorV(cls, fmt, args...)
 
#define HighErrorC(cls, fmt)
 
#define highRETURN_type_S
 
#define high_3_O   BOL
 
#define high_3_Y   I8
 
#define high_3_S   I16
 
#define high_3_I   I32
 
#define high_3_W   I64
 
#define high_3_H   HDL
 
#define high_3_F   FLT
 
#define high_3_D   DBL
 
#define high_3_C   STRN
 
#define high_3_B   BIN
 
#define high_3_U   BUF
 
#define high_3_L   BFL
 
#define high_3_A   BAC
 
#define high_C_BOL   OT_TMP_BOL_OBJ
 
#define high_C_I8   OT_TMP_I8_OBJ
 
#define high_C_I16   OT_TMP_I16_OBJ
 
#define high_C_I32   OT_TMP_I32_OBJ
 
#define high_C_I64   OT_TMP_I64_OBJ
 
#define high_C_H   OT_TMP_HDL_OBJ
 
#define high_C_FLT   OT_TMP_FLT_OBJ
 
#define high_C_DBL   OT_TMP_DBL_OBJ
 
#define high_C_STR   OT_TMP_CST_OBJ
 
#define high_C_BIN   OT_TMP_BIN_OBJ
 
#define high_C_BUF   OT_TMP_BUF_OBJ
 
#define high_C_BFL   OT_TMP_BFL_OBJ
 
#define high_C_A   OT_TMP_BAC_OBJ
 
#define high_T_BOL   MK_BOL
 
#define high_T_I8   MK_I8
 
#define high_T_I16   MK_I16
 
#define high_T_I32   MK_I32
 
#define high_T_I64   MK_I64
 
#define high_T_HDL   MK_HDL
 
#define high_T_FLT   MK_FLT
 
#define high_T_DBL   MK_DBL
 
#define high_T_STR   MK_STRN
 
#define high_T_BIN   MK_BIN
 
#define high_T_BUF   MK_BUF
 
#define high_T_BFL   MK_BFL
 
#define high_T_A   MK_BAC
 
#define MqReadA   MqReadALL
 

Functions

static enum MkErrorE ArgumentTypeError (JNIEnv *env, MK_MNG hdl, jobject val, jclass to, jsize pos, MK_STRN caller)
 
 sendX1 (BOL, Boolean)
 
static enum MkErrorE sendBIN (MK_RT mkrt, MQ_RT mqrt, JNIEnv *env, MQ_CTX hdl, jobject argv, jsize *posP)
 
static enum MkErrorE getSTRING (MK_RT mkrt, MQ_RT mqrt, JNIEnv *env, MK_MNG hdl, jobject self, jobject argv, jsize *posP, MK_STR str, size_t size)
 
static enum MkErrorE getCALL (MK_RT mkrt, MQ_RT mqrt, JNIEnv *env, MK_MNG hdl, jobject self, jobject argv, jsize *posP, MK_CBP *cb)
 
static enum MkErrorE getTIME (MK_RT mkrt, MQ_RT mqrt, JNIEnv *env, MK_MNG hdl, jobject argv, jsize *posP, MK_TIME_T *out)
 

Detailed Description

tag: nhi1-release-250425

Definition in file MqHigh_jv.c.

Macro Definition Documentation

◆ BLOCK_END

#define BLOCK_END ( T)
Value:
} else { \
MkErrorCheck(ArgumentTypeError(env,hdl,val,MQ(Class_##T),*posP,__func__)); \
} \
end: \
(*posP)++; \
return MkErrorGetCode_0E(); \
error: \
MkErrorStack_1X(hdl); \
goto end; \
error_jv: \
OT_ERROR_LNG_2_META(hdl); \
goto end;
static enum MkErrorE ArgumentTypeError(JNIEnv *env, MK_MNG hdl, jobject val, jclass to, jsize pos, MK_STRN caller)
Definition MqHigh_jv.c:47
#define MkErrorGetCode_0E()

Definition at line 101 of file MqHigh_jv.c.

101#define BLOCK_END(T) \
102 } else { \
103 MkErrorCheck(ArgumentTypeError(env,hdl,val,MQ(Class_##T),*posP,__func__)); \
104 } \
105end: \
106 (*posP)++; \
107 return MkErrorGetCode_0E(); \
108error: \
109 MkErrorStack_1X(hdl); \
110 goto end; \
111error_jv: \
112 OT_ERROR_LNG_2_META(hdl); \
113 goto end;

◆ BLOCK_START

#define BLOCK_START ( T)
Value:
jobject val = (*env)->GetObjectArrayElement(env, argv, *posP); \
JavaErrorCheck2 \
if (val == NULL) { \
goto null; \
} else if (OT_LNG_OBJ_CLASS_IS(val,MQ(Class_##T))) { \

Definition at line 94 of file MqHigh_jv.c.

94#define BLOCK_START(T) \
95 jobject val = (*env)->GetObjectArrayElement(env, argv, *posP); \
96 JavaErrorCheck2 \
97 if (val == NULL) { \
98 goto null; \
99 } else if (OT_LNG_OBJ_CLASS_IS(val,MQ(Class_##T))) { \
100

◆ high_3_A

#define high_3_A   BAC

◆ high_3_B

#define high_3_B   BIN

◆ high_3_C

#define high_3_C   STRN

◆ high_3_D

#define high_3_D   DBL

◆ high_3_F

#define high_3_F   FLT

◆ high_3_H

#define high_3_H   HDL

◆ high_3_I

#define high_3_I   I32

◆ high_3_L

#define high_3_L   BFL

◆ high_3_O

#define high_3_O   BOL

◆ high_3_S

#define high_3_S   I16

◆ high_3_U

#define high_3_U   BUF

◆ high_3_W

#define high_3_W   I64

◆ high_3_Y

#define high_3_Y   I8

◆ high_C_A

#define high_C_A   OT_TMP_BAC_OBJ

◆ high_C_BFL

#define high_C_BFL   OT_TMP_BFL_OBJ

◆ high_C_BIN

#define high_C_BIN   OT_TMP_BIN_OBJ

◆ high_C_BOL

#define high_C_BOL   OT_TMP_BOL_OBJ

◆ high_C_BUF

#define high_C_BUF   OT_TMP_BUF_OBJ

◆ high_C_DBL

#define high_C_DBL   OT_TMP_DBL_OBJ

◆ high_C_FLT

#define high_C_FLT   OT_TMP_FLT_OBJ

◆ high_C_H

#define high_C_H   OT_TMP_HDL_OBJ

◆ high_C_I16

#define high_C_I16   OT_TMP_I16_OBJ

◆ high_C_I32

#define high_C_I32   OT_TMP_I32_OBJ

◆ high_C_I64

#define high_C_I64   OT_TMP_I64_OBJ

◆ high_C_I8

#define high_C_I8   OT_TMP_I8_OBJ

◆ high_C_STR

#define high_C_STR   OT_TMP_CST_OBJ

◆ high_T_A

#define high_T_A   MK_BAC

◆ high_T_BFL

#define high_T_BFL   MK_BFL

◆ high_T_BIN

#define high_T_BIN   MK_BIN

◆ high_T_BOL

#define high_T_BOL   MK_BOL

◆ high_T_BUF

#define high_T_BUF   MK_BUF

◆ high_T_DBL

#define high_T_DBL   MK_DBL

◆ high_T_FLT

#define high_T_FLT   MK_FLT

◆ high_T_HDL

#define high_T_HDL   MK_HDL

◆ high_T_I16

#define high_T_I16   MK_I16

◆ high_T_I32

#define high_T_I32   MK_I32

◆ high_T_I64

#define high_T_I64   MK_I64

◆ high_T_I8

#define high_T_I8   MK_I8

◆ high_T_STR

#define high_T_STR   MK_STRN

◆ highCALL

#define highCALL ( f)
Value:
MkErrorCheck(getCALL(MQ_RT_CALL env,hdl,self,argv,&skip,&f))
static enum MkErrorE getCALL(MK_RT mkrt, MQ_RT mqrt, JNIEnv *env, MK_MNG hdl, jobject self, jobject argv, jsize *posP, MK_CBP *cb)
Definition MqHigh_jv.c:288
#define MQ_RT_CALL

◆ highCMD

#define highCMD   "ctx.%s('%s', ..., '%s', ...)"

◆ HighErrorC

#define HighErrorC ( cls,
fmt )
Value:
MkErrorSetV_3M(obj, cls, "%s", fmt)
#define MkErrorSetV_3M(err, callfunc, printfmt,...)

◆ highERRORnative

#define highERRORnative   if ((*env)->ExceptionCheck(env) == JNI_TRUE) OT_ERROR_LNG_2_META(mqctx);

◆ HighErrorV

#define HighErrorV ( cls,
fmt,
args... )
Value:
MkErrorSetV_3M(obj, cls, fmt, args)

◆ highFARGS

#define highFARGS ( f)
Value:
NS(ServiceCall),f,NS(ServiceFree)

◆ highINITcstr

#define highINITcstr   cstr = JO2C_START(env,jcallSig); JavaErrorCheck; /* callSig */

◆ highREAD_HAS_REFERENCE

#define highREAD_HAS_REFERENCE   0

◆ highREAD_RETURN_LIST

#define highREAD_RETURN_LIST   1

◆ highREADinit

#define highREADinit   /* readNUM++; */

◆ highREADprepare

#define highREADprepare

◆ highRETerror

#define highRETerror   OT_ERROR_META_2_LNG(hdl)

◆ highRETok

#define highRETok   goto end

◆ highRETURN

#define highRETURN   highRETURN_type_S

◆ highRETURN_type_S

#define highRETURN_type_S
Value:
if (MkBufferListSizeI(RET) == 0 && highLastReturnListType != '*') { \
} else if (MkBufferListSizeI(RET) == 1 && highLastReturnListType != '*' ) { \
switch (highLastReturnListType) { \
case 'U': OT_retObj_SET_BUF(RET->data[0]); break; \
/* >>>> disable MkBufferListReserve at startup from Send <<<< */ \
/* OLD !! BUG FIX: high2-1-2-U-O-* */ \
/* Return 'U' without 'Temp'orary object make return UNUSEABLE */ \
/* as input for an other "Send", because "MkBufferListCreateTLS" */ \
/* reset the return "U" */ \
/* SEND_ONE_TYP_O { */ \
/* set t [$ctx ReadSTR] */ \
/* set RET [$ctx Send "W" "ECOA:$t@$t" [$ctx Read$t]] */ \
/* $ctx Send "R" $t $RET */ \
/* } */ \
/* => "RET" is broken WITHOUT "temp" */ \
/* case 'U': OT_MK_CALL_0(RET->data[0],MkBufferC,Temp,retObj); break; */ \
case 'L': OT_MK_CALL_0(RET->data[0],MkBufferC,GetBFL,retObj); break; \
default : OT_MK_CALL_0(RET->data[0],MkBufferC,ToObject,retObj); break; \
} \
} else { \
OT_retObj_SET_BFL(RET); \
}
#define OT_MK_CALL_0(obj, cls, meth, ret)
#define OT_retObj_SET_None
#define OT_retObj_SET_BUF(obj)
JNIEXPORT MK_NAT_OBJECT JNICALL ToObject(JNIEnv *env, jobject self)
#define MkBufferListSizeI(bfl)

◆ highSELF

#define highSELF   "Send"

◆ highSEND

#define highSEND ( T)
Value:
MkErrorCheck(send##T(MQ_RT_CALL env,hdl,argv,&skip));break;

◆ highSend_BFL

#define highSend_BFL   highSEND(BFL)

◆ highSend_BIN

#define highSend_BIN   highSEND(BIN)

◆ highSend_BOL

#define highSend_BOL   highSEND(BOL)

◆ highSend_BUF

#define highSend_BUF   highSEND(BUF)

◆ highSend_DBL

#define highSend_DBL   highSEND(DBL)

◆ highSend_FLT

#define highSend_FLT   highSEND(FLT)

◆ highSend_HDL

#define highSend_HDL   highSEND(HDL)

◆ highSend_I16

#define highSend_I16   highSEND(I16)

◆ highSend_I32

#define highSend_I32   highSEND(I32)

◆ highSend_I64

#define highSend_I64   highSEND(I64)

◆ highSend_I8

#define highSend_I8   highSEND(I8)

◆ highSend_STR

#define highSend_STR   highSEND(STR)

◆ highSIZE

#define highSIZE   objc

◆ highSIZE_AVAILABLE

#define highSIZE_AVAILABLE   1

◆ highSKIP

#define highSKIP   skip

◆ highSKIP_SHIFT

#define highSKIP_SHIFT   0

◆ highTIME

#define highTIME ( t)
Value:
MkErrorCheck(getTIME(MQ_RT_CALL env,hdl,argv,&skip,&t));
static enum MkErrorE getTIME(MK_RT mkrt, MQ_RT mqrt, JNIEnv *env, MK_MNG hdl, jobject argv, jsize *posP, MK_TIME_T *out)
Definition MqHigh_jv.c:309

◆ highTOKEN

#define highTOKEN ( s)
Value:
MkErrorCheck(getSTRING(MQ_RT_CALL env,hdl,self,argv,&skip,s,MQ_SEND_TOKEN_SIGNATURE_SIZE))
static enum MkErrorE getSTRING(MK_RT mkrt, MQ_RT mqrt, JNIEnv *env, MK_MNG hdl, jobject self, jobject argv, jsize *posP, MK_STR str, size_t size)
Definition MqHigh_jv.c:269
#define MQ_SEND_TOKEN_SIGNATURE_SIZE

◆ highTRAN

#define highTRAN ( s)
Value:
MkErrorCheck(getSTRING(MQ_RT_CALL env,hdl,self,argv,&skip,s,MQ_SEND_TRANSACTION_TOKEN_SIZE))
#define MQ_SEND_TRANSACTION_TOKEN_SIZE

◆ JavaErrorCheck2

#define JavaErrorCheck2   if ((*env)->ExceptionCheck(env) == JNI_TRUE) goto error_jv;

Definition at line 19 of file MqHigh_jv.c.

◆ jniB

#define jniB   ???

Definition at line 43 of file MqHigh_jv.c.

◆ jniBOL

#define jniBOL   jboolean

Definition at line 35 of file MqHigh_jv.c.

◆ jniC

#define jniC   ???

Definition at line 42 of file MqHigh_jv.c.

◆ jniDBL

#define jniDBL   jdouble

Definition at line 40 of file MqHigh_jv.c.

◆ jniFLT

#define jniFLT   jfloat

Definition at line 38 of file MqHigh_jv.c.

◆ jniHDL

#define jniHDL   jint

Definition at line 41 of file MqHigh_jv.c.

◆ jniI16

#define jniI16   jshort

Definition at line 36 of file MqHigh_jv.c.

◆ jniI32

#define jniI32   jint

Definition at line 37 of file MqHigh_jv.c.

◆ jniI64

#define jniI64   jlong

Definition at line 39 of file MqHigh_jv.c.

◆ jniI8

#define jniI8   jbyte

Definition at line 34 of file MqHigh_jv.c.

◆ jniL

#define jniL   ???

Definition at line 45 of file MqHigh_jv.c.

◆ jniU

#define jniU   ???

Definition at line 44 of file MqHigh_jv.c.

◆ META_CONTEXT_S

#define META_CONTEXT_S   mqctx

Definition at line 15 of file MqHigh_jv.c.

◆ mqctx

#define mqctx   hdl

◆ MqReadA

#define MqReadA   MqReadALL

◆ OT_MK_CALL_0

#define OT_MK_CALL_0 ( obj,
cls,
meth,
ret )
Value:
ret = (*env)->CallObjectMethod(env,cls##_NS(cls##_ObjNew)(MK_RT_CALL env,obj),cls##_NS(MID_##cls##_##meth));JavaErrorCheck;
#define MK_RT_CALL

◆ OT_retObj_SET_BFL

#define OT_retObj_SET_BFL ( obj)
Value:
retObj = MK(MkBufferListC_ObjNew)(MK_RT_CALL env,obj);

◆ OT_retObj_SET_BUF

#define OT_retObj_SET_BUF ( obj)
Value:
retObj = MK(MkBufferC_ObjNew)(MK_RT_CALL env,obj);

◆ OT_retObj_SET_None

#define OT_retObj_SET_None   retObj = NULL;

◆ sendX1

#define sendX1 ( T,
TTT )
Value:
static enum MkErrorE send##T(MQ_RT_ARGS JNIEnv *env, MQ_CTX hdl, jobject argv, jsize *posP) { \
type##T out; \
BLOCK_START(T) \
out = (type##T)(*env)->Call##TTT##Method(env,val,MQ(get_##T)); \
JavaErrorCheck2 \
MkErrorCheck(MqSend##T(hdl,out)); \
} else if (OT_LNG_OBJ_CLASS_IS(val,MQ(Class_STR))) { \
MK_NUM cLen = (*env)->GetStringUTFLength(env,val); \
MK_STRN cVal = (*env)->GetStringUTFChars(env,val ,NULL); \
enum MkErrorE ret = MkString2##T##_RT(MK_RT_CALL cVal,cLen,&out); \
if (cVal) (*env)->ReleaseStringUTFChars(env,val ,cVal ); \
MkErrorCheck(ret); \
MkErrorCheck(MqSend##T(hdl,out)); \
BLOCK_END(T) \
null: \
MqSend##T##_E(hdl,0); \
goto end; \
}
MkErrorE
int32_t MK_NUM
const MK_STRB * MK_STRN
#define MqSend(...)
#define MQ_RT_ARGS
PUBLIC data structure for the jvmqmsgque-specific-data

Definition at line 117 of file MqHigh_jv.c.

117#define sendX1(T,TTT) \
118static enum MkErrorE send##T(MQ_RT_ARGS JNIEnv *env, MQ_CTX hdl, jobject argv, jsize *posP) { \
119 type##T out; \
120 BLOCK_START(T) \
121 out = (type##T)(*env)->Call##TTT##Method(env,val,MQ(get_##T)); \
122 JavaErrorCheck2 \
123 MkErrorCheck(MqSend##T(hdl,out)); \
124 } else if (OT_LNG_OBJ_CLASS_IS(val,MQ(Class_STR))) { \
125 MK_NUM cLen = (*env)->GetStringUTFLength(env,val); \
126 MK_STRN cVal = (*env)->GetStringUTFChars(env,val ,NULL); \
127 enum MkErrorE ret = MkString2##T##_RT(MK_RT_CALL cVal,cLen,&out); \
128 if (cVal) (*env)->ReleaseStringUTFChars(env,val ,cVal ); \
129 MkErrorCheck(ret); \
130 MkErrorCheck(MqSend##T(hdl,out)); \
131 BLOCK_END(T) \
132null: \
133 MqSend##T##_E(hdl,0); \
134 goto end; \
135}

◆ sendX2

#define sendX2 ( T,
ClassC )
Value:
static enum MkErrorE send##T(MQ_RT_ARGS JNIEnv *env, MQ_CTX hdl, jobject argv, jsize *posP) { \
type##T out; \
BLOCK_START(T) \
out = (type##T)pObj2Hdl(env,ClassC,val); \
JavaErrorCheck2 \
MkErrorCheck(MqSend##T(hdl,out)); \
BLOCK_END(T) \
null: \
MqSend##T##_E(hdl,NULL); \
goto end; \
}

◆ typeBFL

#define typeBFL   MK_BFL

Definition at line 31 of file MqHigh_jv.c.

◆ typeBIN

#define typeBIN   MK_BINN

Definition at line 29 of file MqHigh_jv.c.

◆ typeBOL

#define typeBOL   MK_BOL

Definition at line 22 of file MqHigh_jv.c.

◆ typeBUF

#define typeBUF   MK_BUF

Definition at line 30 of file MqHigh_jv.c.

◆ typeDBL

#define typeDBL   MK_DBL

Definition at line 27 of file MqHigh_jv.c.

◆ typeFLT

#define typeFLT   MK_FLT

Definition at line 25 of file MqHigh_jv.c.

◆ typeHDL

#define typeHDL   MK_HDL

Definition at line 32 of file MqHigh_jv.c.

◆ typeI16

#define typeI16   MK_I16

Definition at line 23 of file MqHigh_jv.c.

◆ typeI32

#define typeI32   MK_I32

Definition at line 24 of file MqHigh_jv.c.

◆ typeI64

#define typeI64   MK_I64

Definition at line 26 of file MqHigh_jv.c.

◆ typeI8

#define typeI8   MK_I8

Definition at line 21 of file MqHigh_jv.c.

◆ typeSTR

#define typeSTR   MK_STRN

Definition at line 28 of file MqHigh_jv.c.

Function Documentation

◆ ArgumentTypeError()

static enum MkErrorE ArgumentTypeError ( JNIEnv * env,
MK_MNG hdl,
jobject val,
jclass to,
jsize pos,
MK_STRN caller )
static

Definition at line 47 of file MqHigh_jv.c.

49 {
50 enum MkErrorE ret;
51 if (val) {
52 jclass from = (*env)->GetObjectClass(env,val);
53
54 jstring sVal = (*env)->CallStaticObjectMethod(env,MK(Class_String),NS(MID_String_valueOf),val);
55 JavaErrorCheck;
56 jstring sFrom = (*env)->CallObjectMethod(env,from,MQ(MID_Class_getSimpleName));
57 JavaErrorCheck;
58 jstring sTo = (*env)->CallObjectMethod(env,to ,MQ(MID_Class_getSimpleName));
59 JavaErrorCheck;
60
61 MK_STRN cVal = (*env)->GetStringUTFChars(env,sVal ,NULL);
62 MK_STRN cFrom = (*env)->GetStringUTFChars(env,sFrom,NULL);
63 MK_STRN cTo = (*env)->GetStringUTFChars(env,sTo ,NULL);
64
65 ret = MkErrorSetV_4M_NULL(hdl,__func__,-1,
66 "expect '%s' argument but got '%s' of type '%s' at position '%d'",
67 cTo, cVal, cFrom, pos);
68
69 if (cFrom) (*env)->ReleaseStringUTFChars(env,sFrom,cFrom);
70 if (cTo) (*env)->ReleaseStringUTFChars(env,sTo ,cTo );
71 if (cVal) (*env)->ReleaseStringUTFChars(env,sVal ,cVal );
72 } else {
73 jstring sTo = (*env)->CallObjectMethod(env,to ,MQ(MID_Class_getSimpleName));
74
75 MK_STRN cTo = (*env)->GetStringUTFChars(env,sTo ,NULL);
76
77 ret = MkErrorSetV_4M_NULL(hdl,__func__,-1,
78 "expect '%s' argument but got '%s' at position '%d'",
79 cTo, "NULL", pos);
80
81 if (cTo) (*env)->ReleaseStringUTFChars(env,sTo ,cTo );
82 }
83
84 return ret;
85error:
86 (*env)->ExceptionDescribe(env);
87 (*env)->ExceptionClear(env);
88 MkErrorSetC_1_NULL("internal error...");
89 return MK_ERROR;
90}
#define MkErrorSetV_4M_NULL(m,...)
#define MkErrorSetC_1_NULL(msg)
MK_ERROR
+ Here is the caller graph for this function:

◆ getCALL()

static enum MkErrorE getCALL ( MK_RT mkrt,
MQ_RT mqrt,
JNIEnv * env,
MK_MNG hdl,
jobject self,
jobject argv,
jsize * posP,
MK_CBP * cb )
static

Definition at line 288 of file MqHigh_jv.c.

288 {
289 jobject val = (*env)->GetObjectArrayElement(env, argv, *posP);
291 if (OT_LNG_OBJ_CLASS_IS(val,NS(Class_MqServiceIF))) {
292 (*cb) = MK(ProcCreate)(MK_RT_CALL env, val, NULL, NS(MID_callback), true);
294 if ((*cb)==NULL) {
295 MkErrorSetC(hdl,"ERROR: expect an FUNCTION pointer, but got 'NULL'",__func__,-1);
296 goto error;
297 }
298 } else {
299 MkErrorCheck(ArgumentTypeError(env,hdl,val,NS(Class_MqServiceIF),*posP,__func__));
300 }
301error:
302 (*posP)++;
303 return MkErrorGetCode_0E();
304error_jv:
305 OT_ERROR_LNG_2_META(hdl);
306 goto error;
307}
#define JavaErrorCheck2
Definition MqHigh_jv.c:19
#define MkErrorSetC(...)

◆ getSTRING()

static enum MkErrorE getSTRING ( MK_RT mkrt,
MQ_RT mqrt,
JNIEnv * env,
MK_MNG hdl,
jobject self,
jobject argv,
jsize * posP,
MK_STR str,
size_t size )
static

Definition at line 269 of file MqHigh_jv.c.

270 {
271 jobject val = (*env)->GetObjectArrayElement(env, argv, *posP);
273 if (OT_LNG_OBJ_CLASS_IS(val,MK(Class_String))) {
274 MK_STRN strS = JO2C_START(env, val);
275 strncpy(str,strS,size);
276 JO2C_STOP(env,val,strS);
277 } else {
278 MkErrorCheck(ArgumentTypeError(env,hdl,val,MK(Class_String),*posP,__func__));
279 }
280error:
281 (*posP)++;
282 return MkErrorGetCode_0E();
283error_jv:
284 OT_ERROR_LNG_2_META(hdl);
285 goto error;
286}

◆ getTIME()

static enum MkErrorE getTIME ( MK_RT mkrt,
MQ_RT mqrt,
JNIEnv * env,
MK_MNG hdl,
jobject argv,
jsize * posP,
MK_TIME_T * out )
static

Definition at line 309 of file MqHigh_jv.c.

309 {
310 jobject val = (*env)->GetObjectArrayElement(env, argv, *posP);
312 if (OT_LNG_OBJ_CLASS_IS(val,MQ(Class_I64))) {
313 *out = (MK_TIME_T) (*env)->CallIntMethod(env,val,MQ(get_I64));
315 } else {
316 MkErrorCheck(ArgumentTypeError(env,hdl,val,MQ(Class_I64),*posP,__func__));
317 }
318error:
319 (*posP)++;
320 return MkErrorGetCode_0E();
321error_jv:
322 OT_ERROR_LNG_2_META(hdl);
323 goto error;
324}
time_t MK_TIME_T

◆ sendBIN()

static enum MkErrorE sendBIN ( MK_RT mkrt,
MQ_RT mqrt,
JNIEnv * env,
MQ_CTX hdl,
jobject argv,
jsize * posP )
static

Definition at line 176 of file MqHigh_jv.c.

176 {
177 BLOCK_START(BIN)
178 typeBIN out = (MK_BINN) (*env)->GetByteArrayElements(env, val, NULL);
180 MK_SIZE sze = (MK_SIZE) (*env)->GetArrayLength (env, val);
182 enum MkErrorE ret = MqSendBIN(hdl,MkBinaryCreate(sze,out));
183 (*env)->ReleaseByteArrayElements(env, val, (jbyte*)out, JNI_ABORT);
185 MkErrorCheck(ret);
186 BLOCK_END(BIN)
187null:
188 MqSendBIN_E(hdl,MkBinaryCreate(0,NULL));
189 goto end;
190}
#define typeBIN
Definition MqHigh_jv.c:29
#define BLOCK_END(T)
Definition MqHigh_jv.c:101
#define BLOCK_START(T)
Definition MqHigh_jv.c:94
static MkBinaryR MkBinaryCreate(MK_SIZE size, MK_BINN data)
long MK_SIZE
MK_BINB const * MK_BINN
#define MqSendBIN(...)
#define MqSendBIN_E(...)

◆ sendX1()

sendX1 ( BOL ,
Boolean  )

Definition at line 137 of file MqHigh_jv.c.

147 { \
148 type##T out; \
149 BLOCK_START(T) \
150 out = (type##T)pObj2Hdl(env,ClassC,val); \
151 JavaErrorCheck2 \
152 MkErrorCheck(MqSend##T(hdl,out)); \
153 BLOCK_END(T) \
154null: \
155 MqSend##T##_E(hdl,NULL); \
156 goto end; \
157}
158
159sendX2(BUF,"MkBufferC")
160sendX2(BFL,"MkBufferListC")
161
162static enum MkErrorE sendSTR(MQ_RT_ARGS JNIEnv *env, MQ_CTX hdl, jobject argv, jsize *posP) {
163 BLOCK_START(STR)
164 typeSTR out = (*env)->GetStringUTFChars(env,val,NULL);
166 enum MkErrorE ret = MqSendSTR(hdl,out);
167 if (out) (*env)->ReleaseStringUTFChars(env,val,out);
169 MkErrorCheck(ret);
170 BLOCK_END(STR)
171null:
172 MqSendSTR_E(hdl,NULL);
173 goto end;
174}
#define typeSTR
Definition MqHigh_jv.c:28
#define sendX2(T, ClassC)
#define MqSendSTR_E(...)
#define MqSendSTR(...)