Struct jni::JavaVM [−][src]
pub struct JavaVM(_);
The invocation API.
Methods
impl JavaVM
[src]
impl JavaVM
pub unsafe fn from_raw(ptr: *mut JavaVM) -> Result<Self>
[src]
pub unsafe fn from_raw(ptr: *mut JavaVM) -> Result<Self>
Create a JavaVM from a raw pointer.
pub fn get_java_vm_pointer(&self) -> *mut JavaVM
[src]
pub fn get_java_vm_pointer(&self) -> *mut JavaVM
Returns underlying sys::JavaVM
interface.
pub fn attach_current_thread(&self) -> Result<AttachGuard>
[src]
pub fn attach_current_thread(&self) -> Result<AttachGuard>
Attaches the current thread to a Java VM. The resulting AttachGuard
can be dereferenced to a JNIEnv
and automatically detaches the thread
when dropped.
pub fn attach_current_thread_as_daemon(&self) -> Result<JNIEnv>
[src]
pub fn attach_current_thread_as_daemon(&self) -> Result<JNIEnv>
Attaches the current thread to a Java VM as a daemon.
pub fn get_env(&self) -> Result<JNIEnv>
[src]
pub fn get_env(&self) -> Result<JNIEnv>
Get the JNIEnv
associated with the current thread, or
ErrorKind::Detached
if the current thread is not attached to the java VM.