Codemesh Runtime v3 C++ API Reference  3.9.205
xmog_JNIEnv.h
1 //
2 // Copyright (c) 1999-2020 by Codemesh, Inc.. ALL RIGHTS RESERVED.
3 //
4 
5 #ifndef xmog_JNIEnv_inc
6 #define xmog_JNIEnv_inc
7 
8 
9 #include "xmog.h"
10 
11 
12 #if (XMOG_IMPLEMENTS_REMOTE_CLIENT==1)
13 
14 
15 class xmog_jvm;
16 class xmog_localenv;
17 struct xmog_JavaVM;
18 
19 
20 #include "xmog_java_value.h"
21 
22 
26 struct xmog_JNIEnv : public JNIEnv_
27 {
28 public:
29 
33  xmog_JNIEnv( xmog_JavaVM * jvm );
34 
38  ~xmog_JNIEnv();
39 
44  void set_localenv( xmog_localenv * env );
45 
49  xmog_localenv * get_localenv() const;
50 
54  xmog_JavaVM * get_jvm() const;
55 
59  void set_throwable( const xmog_remote_java_exception & t );
60 
65 
70 
71 private:
72 
81  xmog_localenv * theEnv;
82 
86  xmog_JavaVM * jvm;
87 
91  xmog_remote_java_exception theException_;
92 
100  xmog_remote_java_exception thePreviousException_;
101 };
102 
103 
104 #endif /* XMOG_IMPLEMENTS_REMOTE_CLIENT */
105 
106 
107 #endif /* xmog_JNIEnv_inc */
xmog_JNIEnv::get_throwable
const xmog_remote_java_exception & get_throwable() const
Returns a Throwable that has been set into the instance.
xmog_JNIEnv::xmog_JNIEnv
xmog_JNIEnv(xmog_JavaVM *jvm)
A constructor that associates the env with a jvm.
xmog_JNIEnv::get_jvm
xmog_JavaVM * get_jvm() const
Returns the jvm to which this instance belongs.
xmog_JavaVM
An abstract JavaVM type that is used as a base class for concrete JavaVM_ replacement types.
Definition: xmog_JavaVM.h:39
xmog_JNIEnv::get_previous_throwable
const xmog_remote_java_exception & get_previous_throwable() const
Returns a Throwable that was set into the instance but then cleared.
xmog_remote_java_exception
A utility class used to hold on to exceptions thrown on the other side.
Definition: xmog_java_value.h:68
xmog_JNIEnv::set_throwable
void set_throwable(const xmog_remote_java_exception &t)
Sets a Throwable into the instance.
xmog_jvm
The class that represents a Java Virtual Machine in the framework.
Definition: xmog_jvm.h:41
xmog_localenv
A class representing per-thread information for the integration runtime.
Definition: xmog_localenv.h:32
xmog_JNIEnv::set_localenv
void set_localenv(xmog_localenv *env)
Sets the higher-level abstraction that owns this instance into this instance.
xmog_JNIEnv::get_localenv
xmog_localenv * get_localenv() const
Returns the higher-level abstraction that owns this instance.
xmog_JNIEnv
An abstract baseclass for concrete JNIEnv implementations.
Definition: xmog_JNIEnv.h:26
xmog_JNIEnv::~xmog_JNIEnv
~xmog_JNIEnv()
Destructor.

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