Codemesh Runtime v3 C++ API Reference
3.9.205
|
5 #ifndef IPv4Sockets_JavaVM_inc
6 #define IPv4Sockets_JavaVM_inc
12 #if (XMOG_IMPLEMENTS_REMOTE_CLIENT==1)
15 #include "ace/Barrier.h"
16 #include "ace/Synch_Traits.h"
17 #include "ace/Task_Ex_T.h"
18 #include "ace/TSS_T.h"
23 #include "xmog_JavaVM.h"
24 #include "xmog_java_client.h"
48 private ACE_Task_Ex<ACE_MT_SYNCH, xmog_request>
59 const ACE_TCHAR *server_addr,
60 unsigned int connect_timeout = 0,
61 unsigned int reply_timeout = 0);
66 int signon (
const char * serverAppNameUTF,
67 const char * clientDisplayNameUTF = NULL,
68 const char * clientSignOnNameUTF = NULL,
69 const char * clientCredentialsUTF = NULL,
70 int authenticationType = 0,
71 int strCopyLimit = 256,
72 int primArrayCopyLimit = 256,
73 bool bMaintainObjId =
true,
74 bool bSendStringOnFirstRef =
true,
75 bool bAlignData =
true );
77 int attach (
void **penv, JavaVMAttachArgs *args,
bool daemon);
220 static JNIInvokeInterface_ theFunctions;
225 virtual int svc (
void);
226 virtual int close (u_long flags = 0);
231 virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
238 virtual int handle_exception (ACE_HANDLE fd = ACE_INVALID_HANDLE);
240 virtual int handle_close (ACE_HANDLE handle,
241 ACE_Reactor_Mask close_mask);
243 ACE_Barrier start_barrier_;
245 bool delete_comm_strategy_;
246 ACE_TCHAR server_addr_[256];
247 int connect_timeout_;
249 ACE_Message_Block *msg_in_;
250 typedef enum { LENGTH, BODY } ReadState;
252 size_t incoming_msg_len_;
256 ACE_DLList<xmog_request> requests_;
262 jint clsRemoteStringUtils_;
void RemoteGetArrayRegion(const char *arrType, jarray array, jsize start, jsize len, void *buf, xmog_JNIEnv *env)
Returns the values in a region of an array.
jboolean RemoteIsInstanceOf(jobject obj, jclass clazz, xmog_JNIEnv *env)
Queries for an instance-of relationship between an object and a type.
Represents a request communicated between client and server.
Definition: xmog_request.h:50
jarray RemoteNewPrimitiveArray(const char *arrType, void *pData, jsize size, xmog_JNIEnv *env)
Creates a primitive array from the given data and returns the handle.
IPv4Sockets_JavaVM(xmog_i_comm_strategy *comm_strategy, const ACE_TCHAR *server_addr, unsigned int connect_timeout=0, unsigned int reply_timeout=0)
jboolean RemoteIsAssignableFrom(jclass sub, jclass sup, xmog_JNIEnv *env)
Queries for an inheritance relationship between two types.
void RemoteSetArrayRegion(const char *arrType, jarray array, jsize start, jsize len, void *buf, xmog_JNIEnv *env)
Sets the values of a region of an array.
An abstract JavaVM type that is used as a base class for concrete JavaVM_ replacement types.
Definition: xmog_JavaVM.h:39
A JavaVM type that uses IPv4 sockets to communicate with an out-of-process JVM.
Definition: IPv4Sockets_JavaVM.h:47
Defines the interface that xmog_jvm uses to communicate with a server.
Definition: xmog_i_comm_strategy.h:36
A class implementing the xmog_java_dynamic interface for accessing Java methods via JNI or Codemesh's...
Definition: xmog_java_method.h:38
jclass RemoteGetClass(jobject obj, xmog_JNIEnv *env)
Queries for the type of an object.
The baseclass for all proxy types in the framework.
Definition: xmog_base.h:29
A class representing per-thread information for the integration runtime.
Definition: xmog_localenv.h:32
jstring RemoteNewString(const unsigned short *str, xmog_JNIEnv *env, int len=-1)
Attempts to create a string on the server.
jarray RemoteNewArray(const char *arrType, jsize size, xmog_JNIEnv *env)
Creates an array and returns the handle.
int signon(const char *serverAppNameUTF, const char *clientDisplayNameUTF=NULL, const char *clientSignOnNameUTF=NULL, const char *clientCredentialsUTF=NULL, int authenticationType=0, int strCopyLimit=256, int primArrayCopyLimit=256, bool bMaintainObjId=true, bool bSendStringOnFirstRef=true, bool bAlignData=true)
Send a SIGNON request to the remote JVM and wait for its reply.
int submit(xmog_request *request)
A C++ wrapper for Java types.
Definition: xmog_java_class.h:31
An abstract baseclass for concrete JNIEnv implementations.
Definition: xmog_JNIEnv.h:26
jclass RemoteGetSuperClass(jclass sub, xmog_JNIEnv *env)
Queries for a subtype's superclass.
jstring RemoteNewStringUtf(const char *str, xmog_JNIEnv *env)
Attempts to create a string on the server.
Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.