ug4
ug::vrl::threading Namespace Reference

Classes

class  JNIThreadException
 

Enumerations

enum  ExceptionType { ATTACH_FAILED , DETACH_FAILED , NOT_ATTACHED }
 

Functions

JNIEnv * attachThread (JavaVM *javaVM)
 
void detachThread (JavaVM *javaVM)
 
JNIEnv * getEnv (JavaVM *javaVM)
 

Enumeration Type Documentation

◆ ExceptionType

Exception type

Enumerator
ATTACH_FAILED 

Attaching current thread to JVM failed.

DETACH_FAILED 

Detaching current thread from JVM failed.

NOT_ATTACHED 

Current thread not attached to JVM.

Function Documentation

◆ attachThread()

JNIEnv* ug::vrl::threading::attachThread ( JavaVM *  javaVM)
inline

Attaches the current thread to the JVM. If the thread is already attached this is equivalent to getEnv().

Parameters
javaVMJava VM to operate on
Returns
JVM environment of the current thread
Exceptions
JNIThreadException

References ATTACH_FAILED, and ug::vrl::javaVM.

Referenced by ug::vrl::MessageBuffer::addMessage().

◆ detachThread()

void ug::vrl::threading::detachThread ( JavaVM *  javaVM)
inline

Detaches the current thread from the JVM.

Parameters
javaVMJava VM to operate on
Exceptions
JNIThreadException

References DETACH_FAILED, and ug::vrl::javaVM.

◆ getEnv()