Codemesh Runtime v3 C++ API Reference  3.9.205
IPv4Sockets_JNIEnv.h
1 //
2 // Copyright (c) 1999-2020 by Codemesh, Inc.. ALL RIGHTS RESERVED.
3 //
4 
5 #ifndef IPv4Sockets_JNIEnv_inc
6 #define IPv4Sockets_JNIEnv_inc
7 
8 
9 #include "xmog.h"
10 
11 
12 #if (XMOG_IMPLEMENTS_REMOTE_CLIENT==1)
13 
14 
15 #include "xmog_JNIEnv.h"
16 
17 
18 struct xmog_base;
20 class IPv4Sockets_JavaVM;
21 
27 {
28 public:
29 
33 
36  void setThreadID (jint assigned_id);
37  jint getThreadID (void) const { return this->assigned_thread_id_; }
38 
42  jint getMemberId( jclass classId, const char * name, const char * sig ) const;
43 
47  int getFieldValue( xmog_remote_java_value & result, jclass classId, xmog_base * target, jfieldID fid );
48 
52  int setFieldValue( jclass classId, xmog_base * target, jfieldID fid, const xmog_remote_java_value & val );
53 
57  int callMethod( xmog_remote_java_value & result, jclass classId, xmog_base * target, jmethodID mid, int numArgs, const xmog_remote_java_value * args, bool bIsCtor = false, bool bLimitRetValCopying = false );
58 
59 private:
60 
61  // Must pass IPv4Sockets_JavaVM pointer
63 
68  void init();
69 
73  jint assigned_thread_id_;
74 
81  static JNINativeInterface_ theFunctions;
82 };
83 
84 
85 #endif /* XMOG_IMPLEMENTS_REMOTE_CLIENT */
86 
87 
88 
89 #endif /* IPv4Sockets_JNIEnv_inc */
xmog_JNIEnv::xmog_JNIEnv
xmog_JNIEnv(xmog_JavaVM *jvm)
A constructor that associates the env with a jvm.
xmog_remote_java_value
A helper type used to convey remote Java arguments around.
Definition: xmog_java_value.h:20
IPv4Sockets_JavaVM
A JavaVM type that uses IPv4 sockets to communicate with an out-of-process JVM.
Definition: IPv4Sockets_JavaVM.h:47
IPv4Sockets_JNIEnv::callMethod
int callMethod(xmog_remote_java_value &result, jclass classId, xmog_base *target, jmethodID mid, int numArgs, const xmog_remote_java_value *args, bool bIsCtor=false, bool bLimitRetValCopying=false)
Calls a method.
IPv4Sockets_JNIEnv::getFieldValue
int getFieldValue(xmog_remote_java_value &result, jclass classId, xmog_base *target, jfieldID fid)
Returns the value of a field.
IPv4Sockets_JNIEnv::setFieldValue
int setFieldValue(jclass classId, xmog_base *target, jfieldID fid, const xmog_remote_java_value &val)
Sets the value of a field.
xmog_base
The baseclass for all proxy types in the framework.
Definition: xmog_base.h:29
IPv4Sockets_JNIEnv::setThreadID
void setThreadID(jint assigned_id)
Set the ID by which the remote JVM knows this thread. The ID is obtained via the THREAD_ID_REQUEST wh...
IPv4Sockets_JNIEnv
A JNIEnv type that uses IPv4 sockets to communicate with an out-of-process JVM.
Definition: IPv4Sockets_JNIEnv.h:26
xmog_JNIEnv
An abstract baseclass for concrete JNIEnv implementations.
Definition: xmog_JNIEnv.h:26
IPv4Sockets_JNIEnv::getMemberId
jint getMemberId(jclass classId, const char *name, const char *sig) const
Returns the server-asigned member ID of a class element.

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.