Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

## Package com.bea.jvm

Provides the interfaces and the factory class for the JRockit management API.

See:
Description

Interface Summary
CallTraceElement | 1.3 compatible version of StackTraceElement.
ClassLibrary | Interface to query and monitor the JVM's set of currently loaded classes and their classloaders.
ClassPreProcessor | The interface implemented by a class preprocessor.
CompilationSystem | Interface to the compilation (machine code generation) unit of the JVM.
CPU | Represents a processing unit in the Machine.
Describable | A component capable of describing itself.
GarbageCollector | This interface represents a Garbage Collector in the JVM.
HardwareComponent | A hardware component of the machine.
JVM | Represents the JVM.
JVMComponent | Interface for subcomponents of the JVM.
Machine | Represents the hardware on which the OperatingSystem and JVM is run.
Memory | Interface for components having some sort of memory.
MemorySystem | Interface to the JVM memory system.
NIC | Interface for the physical network interface components.
OperatingSystem | Representation of the Operating system.
Optimization | An available code optimization in the CompilationSystem.
OptimizationLevel | A representation of a set of optimizations that comprise a 'level' of optimization.
PhysicalMemory | The physical memory in a Machine.
ProfilingSystem | Interface for retrieving profiling information from JRockit.
ThreadSnapshot | Interface representing a snapshot of a thread's state at a given time.
ThreadSystem | Interface to the thread system of the JVM.

Class Summary
JVMFactory | A utility class to acquire a JVM instance.
ManagementPermission | Basic security permission needed for accessing the ManagementAPI.

Exception Summary
NoSuchThreadException | Exception thrown by various methods in the ThreadSystem interface.
NotAvailableException | Exception thrown when a certain feature isn't currently available in this JVM.
UnapplicableMethodException | Exception thrown by various parts of the ProfilingSystem whenever the method used as an argument to a method isn't applicable, either because of some modifier, or because the functionality hasn't been activated for that specific method.

## Package com.bea.jvm Description

Provides the interfaces and the factory class for the JRockit management API.

### Overview

`JVMFactory` – Provides a static method to fetch an instance of JVM. This is the starting point for working with the API.
`JVM` – Provides basic information about the JVM and is also the interface from which to access the different information subsystems available.

The subsystems reachable from JVM are:

- `ClassLibrary` – Provides a way to monitor and manage the set of currently loaded Classes and ClassLoaders.
- `CompilationSystem` – Provides a way to monitor and manage the way methods and constructors are compiled.
- `Machine` – Provides information about the hardware the JVM is running on, like CPUs, network adapters and memory.
- `MemorySystem` – Provides heap and garbage collection data.
- `OperatingSystem` – Basic information about the OS the JVM is running on.
- `ProfilingSystem` – Provides a way to perform lightweight profiling of the JVM, for instance invocation counting.
- `ThreadSystem` – Provides thread stack dumps, thread snapshots, thread counts and means to access the threads running in JRockit.

### Basic usage

First you fetch a reference to an actual instance of JVM by using the JVMFactory:

    	com.bea.jvm.JVM myJVM = com.bea.jvm.JVMFactory.getJVM();

From the JVM instance you can access the different subsystems, for instance the memory system. From the memory system you can, for example, ask for heap size information, or access the GarbageCollector. Reading the currently used heap size (in bytes) looks like this:

    	com.bea.jvm.JVM myJVM = com.bea.jvm.JVMFactory.getJVM();
    	long heapSize = myJVM.getMemorySystem().getUsedHeapSize();

To check if we are using a parallel garbage collector with a nursery could look like this:

    	com.bea.jvm.GarbageCollector myGC = myJVM.getMemorySystem().getGarbageCollector();
    	boolean isParallelWithNursery = myGC.isParallel() && myGC.isGenerational();

Since:
  JRockit Viking
See Also:
  com.bea.jvm

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES