JuggerNET Runtime Library v3.6.54.0  3.6.54.0
Public Member Functions | Protected Attributes | Properties | List of all members
Codemesh.JuggerNET.Jvm Class Reference

The default implementation for the IJvm interface. You are unlikely to ever have to use these methods explicitly, unless you want to control in detail how .NET threads are attached to the Java virtual machine. More...

Inheritance diagram for Codemesh.JuggerNET.Jvm:
Inheritance graph
[legend]
Collaboration diagram for Codemesh.JuggerNET.Jvm:
Collaboration graph
[legend]

Public Member Functions

 Jvm (long pInstance)
 Initializes a new instance represnting an already loaded JVM. More...
 
long Attach ()
 Attaches the current thread to the JVM. This method is not exposed to COM to prevent overloading issues. More...
 
long Attach (JavaProxy threadGroup)
 Attaches the current thread to the JVM and adds it to the specified threadgroup. This method is not exposed to COM to prevent overloading issues. More...
 
long Attach (JavaProxy threadGroup, string name)
 Attaches the current thread to the JVM and adds it to the specified threadgroup with the specified threadname. This method is not exposed to COM to prevent overloading issues. More...
 
long Attach (JavaProxy threadGroup, string name, bool bAsDaemon)
 Attaches the current thread to the JVM and adds it to the specified threadgroup with the specified threadname and possibly as a daemon thread. More...
 
long Attach (long env)
 Attaches an already created Java thread to the runtime. This method is not exposed to COM to prevent overloading issues. More...
 
void Detach ()
 Detaches the current thread from the JVM. More...
 
void Detach (long env)
 Detaches the current thread from the JVM. This method is not exposed to COM to prevent overloading issues. More...
 
void Destroy ()
 Attempts to unload the JVM. More...
 

Protected Attributes

long pInstance
 

Properties

long Ptr [get]
 A property representing the loaded JVM. More...
 
long FreeMemory [get]
 A property representing the free memory in the JVM. More...
 
long MaxMemory [get]
 A property representing the maximally available memory for the JVM. More...
 
long TotalMemory [get]
 A property representing the memory used by the JVM. More...
 
- Properties inherited from Codemesh.JuggerNET.IJvm
long Ptr [get]
 A property representing the loaded JVM. More...
 
long FreeMemory [get]
 A property representing the free memory in the JVM. More...
 
long MaxMemory [get]
 A property representing the maximally available memory for the JVM. More...
 
long TotalMemory [get]
 A property representing the memory used by the JVM. More...
 

Detailed Description

The default implementation for the IJvm interface. You are unlikely to ever have to use these methods explicitly, unless you want to control in detail how .NET threads are attached to the Java virtual machine.

Constructor & Destructor Documentation

◆ Jvm()

Codemesh.JuggerNET.Jvm.Jvm ( long  pInstance)
inline

Initializes a new instance represnting an already loaded JVM.

Parameters
pInstancea pointer to the already laoded JVM. The pointed to object is intentionally left opaque. You should not specifically not assume that it is a JavaVM pointer.

Member Function Documentation

◆ Attach() [1/5]

long Codemesh.JuggerNET.Jvm.Attach ( )
inline

Attaches the current thread to the JVM. This method is not exposed to COM to prevent overloading issues.

Returns
a long representing the local environment.

Implements Codemesh.JuggerNET.IJvm.

Referenced by Codemesh.JuggerNET.Jvm.Attach().

◆ Attach() [2/5]

long Codemesh.JuggerNET.Jvm.Attach ( JavaProxy  threadGroup)
inline

Attaches the current thread to the JVM and adds it to the specified threadgroup. This method is not exposed to COM to prevent overloading issues.

Parameters
threadGroupthe thread group to which to attach the thread. May be null.
Returns
a long representing the local environment.

Implements Codemesh.JuggerNET.IJvm.

References Codemesh.JuggerNET.Jvm.Attach().

◆ Attach() [3/5]

long Codemesh.JuggerNET.Jvm.Attach ( JavaProxy  threadGroup,
string  name 
)
inline

Attaches the current thread to the JVM and adds it to the specified threadgroup with the specified threadname. This method is not exposed to COM to prevent overloading issues.

Parameters
threadGroupthe thread group to which to attach the thread. May be null.
namethe name under which the thread is known in Java. May be null.
Returns
a long representing the local environment.

Implements Codemesh.JuggerNET.IJvm.

References Codemesh.JuggerNET.Jvm.Attach().

◆ Attach() [4/5]

long Codemesh.JuggerNET.Jvm.Attach ( JavaProxy  threadGroup,
string  name,
bool  bAsDaemon 
)
inline

Attaches the current thread to the JVM and adds it to the specified threadgroup with the specified threadname and possibly as a daemon thread.

Parameters
threadGroupthe thread group to which to attach the thread. May be null.
namethe name under which the thread is known in Java. May be null.
bAsDaemontrue if the thread should become a background thread that does not prevent the JVM from exiting even if it is still running.
Returns
a long representing the local environment.

Implements Codemesh.JuggerNET.IJvm.

References Codemesh.JuggerNET.JavaProxy.JObject.

◆ Attach() [5/5]

long Codemesh.JuggerNET.Jvm.Attach ( long  env)
inline

Attaches an already created Java thread to the runtime. This method is not exposed to COM to prevent overloading issues.

Parameters
envthe local environment.
Returns
a long representing the local environment.

Implements Codemesh.JuggerNET.IJvm.

◆ Destroy()

void Codemesh.JuggerNET.Jvm.Destroy ( )
inline

Attempts to unload the JVM.

You should not assume that you can reload another JVM after you have called this method to unload a JVM.

Implements Codemesh.JuggerNET.IJvm.

References Codemesh.JuggerNET.JvmLoader.GetJvmLoader(), and Codemesh.JuggerNET.IJvmLoader.UnloadCleanup().

◆ Detach() [1/2]

void Codemesh.JuggerNET.Jvm.Detach ( )
inline

Detaches the current thread from the JVM.

Implements Codemesh.JuggerNET.IJvm.

◆ Detach() [2/2]

void Codemesh.JuggerNET.Jvm.Detach ( long  env)
inline

Detaches the current thread from the JVM. This method is not exposed to COM to prevent overloading issues.

Parameters
envthe local environment.

Implements Codemesh.JuggerNET.IJvm.

Property Documentation

◆ FreeMemory

long Codemesh.JuggerNET.Jvm.FreeMemory
get

A property representing the free memory in the JVM.

◆ MaxMemory

long Codemesh.JuggerNET.Jvm.MaxMemory
get

A property representing the maximally available memory for the JVM.

◆ Ptr

long Codemesh.JuggerNET.Jvm.Ptr
get

A property representing the loaded JVM.

◆ TotalMemory

long Codemesh.JuggerNET.Jvm.TotalMemory
get

A property representing the memory used by the JVM.


The documentation for this class was generated from the following file:

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