com.ibm.dtfj.java
Interface JavaRuntime

All Superinterfaces:
ManagedRuntime

public interface JavaRuntime
extends ManagedRuntime

Represents an instance of a JavaVM within the ImageProcess


Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.Iterator getCompiledMethods()
          This is short cut method.
 java.util.Iterator getHeaps()
           
 java.util.Iterator getJavaClassLoaders()
           
 ImagePointer getJavaVM()
           
 JavaVMInitArgs getJavaVMInitArgs()
          Fetch the JavaVMInitArgs which were used to create this VM.
 java.util.Iterator getMonitors()
          Provides access to the collection of monitors used in the JavaVM.
 java.util.Iterator getThreads()
           
 java.lang.Object getTraceBuffer(java.lang.String bufferName, boolean formatted)
          Fetches implementation specific trace buffers, like the verbose GC buffer or the Universal Trace Engine (UTE) buffer
 int hashCode()
           
 
Methods inherited from interface com.ibm.dtfj.runtime.ManagedRuntime
getFullVersion, getVersion
 

Method Detail

getJavaVM

public ImagePointer getJavaVM()
                       throws CorruptDataException
Returns:
the address of the JavaVM struct which represnts this JVM instance in JNI
Throws:
CorruptDataException

getJavaVMInitArgs

public JavaVMInitArgs getJavaVMInitArgs()
                                 throws DataUnavailable,
                                        CorruptDataException
Fetch the JavaVMInitArgs which were used to create this VM. See JNI_CreateJavaVM in the JNI Specification for more details.

Returns:
the JavaVMInitArgs which were used to create this VM.
Throws:
DataUnavailable - if the arguments are not available
CorruptDataException

getJavaClassLoaders

public java.util.Iterator getJavaClassLoaders()
Returns:
an iterator of all of the class loaders within this JavaVM
See Also:
JavaClassLoader, CorruptData

getThreads

public java.util.Iterator getThreads()
Returns:
an iterator of the JavaThreads in the runtime
See Also:
JavaThread, CorruptData

getCompiledMethods

public java.util.Iterator getCompiledMethods()
This is short cut method. The same result can be found by iterating over all methods in all class loaders in all classes.

Returns:
an iterator over all of the JavaMethods in the JavaRuntime which have been compiled
See Also:
JavaMethod, CorruptData

getMonitors

public java.util.Iterator getMonitors()
Provides access to the collection of monitors used in the JavaVM. This collection includes both monitors associated with managed objects (e.g. object monitors) and monitors associated with internal control structures (e.g. raw monitors)

Returns:
an iterator over the collection of monitors
See Also:
JavaMonitor, CorruptData

getHeaps

public java.util.Iterator getHeaps()
Returns:
an iterator for all of the Java heaps within this runtime. Heaps may be specific to this JavaVM instance, or may be shared between multiple JavaVM instances
See Also:
JavaHeap, CorruptData

getTraceBuffer

public java.lang.Object getTraceBuffer(java.lang.String bufferName,
                                       boolean formatted)
                                throws CorruptDataException
Fetches implementation specific trace buffers, like the verbose GC buffer or the Universal Trace Engine (UTE) buffer

Parameters:
bufferName - a String naming the buffer to be fetched
formatted - true if formatting should be performed on the buffer, or false if the raw buffer contents should be returned
Returns:
an implementation specific result, depending on the parameters
Throws:
CorruptDataException

equals

public boolean equals(java.lang.Object obj)
Parameters:
obj -
Returns:
True obj refers to the same Java Runtime in the image

hashCode

public int hashCode()