adaptj.event
Class AdaptJEvent

java.lang.Object
  |
  +--adaptj.event.AdaptJEvent
All Implemented Interfaces:
AdaptJSpecConstants
Direct Known Subclasses:
ArenaDeleteEvent, ArenaNewEvent, ClassLoadEvent, ClassUnloadEvent, CompiledMethodLoadEvent, CompiledMethodUnloadEvent, DumpEvent, GCFinishEvent, GCStartEvent, InstructionStartEvent, JVMInitDoneEvent, JVMShutDownEvent, MethodEntry2Event, MethodEntryEvent, MethodExitEvent, MonitorEvent, ObjectAllocEvent, ObjectFreeEvent, ObjectMoveEvent, RawMonitorEvent, ThreadEndEvent, ThreadStartEvent, ThreadStatusChangeEvent

public abstract class AdaptJEvent
extends java.lang.Object
implements AdaptJSpecConstants

An abstract event class which is the base class for all AdaptJ events. This class defines the various AdaptJ Event Type IDs notably used as array indices in the AdaptJ framework. In order to minimize the time needed to process events, all fields provided by AdaptJEvent are declared public, thus allowing access to their values without requiring a method call. All subclasses of AdaptJEvent use the same strategy.

Author:
Bruno Dufour
See Also:
The Java Virtual Machine Profiler Interface (JVMPI)

Field Summary
static int ADAPTJ_ARENA_DELETE
          The AdaptJ Event Type ID corresponding to a JVMPI_ARENA_DELETE event.
static int ADAPTJ_ARENA_NEW
          The AdaptJ Event Type ID corresponding to a JVMPI_ARENA_NEW event.
static int ADAPTJ_CLASS_LOAD
          The AdaptJ Event Type ID corresponding to a JVMPI_CLASS_LOAD event.
static int ADAPTJ_CLASS_LOAD_HOOK
          The AdaptJ Event Type ID corresponding to a JVMPI_CLASS_LOAD_HOOK event.
static int ADAPTJ_CLASS_UNLOAD
          The AdaptJ Event Type ID corresponding to a JVMPI_CLASS_UNLOAD event.
static int ADAPTJ_COMPILED_METHOD_LOAD
          The AdaptJ Event Type ID corresponding to a JVMPI_COMPILED_METHOD_LOAD event.
static int ADAPTJ_COMPILED_METHOD_UNLOAD
          The AdaptJ Event Type ID corresponding to a JVMPI_COMPILED_METHOD_UNLOAD event.
static int ADAPTJ_DATA_DUMP_REQUEST
          The AdaptJ Event Type ID corresponding to a JVMPI_DATA_DUMP_REQUEST event.
static int ADAPTJ_DATA_RESET_REQUEST
          The AdaptJ Event Type ID corresponding to a JVMPI_DATA_RESET_REQUEST event.
static int ADAPTJ_EVENT_COUNT
          The total number of events that are known to the AdaptJ framework.
static int ADAPTJ_GC_FINISH
          The AdaptJ Event Type ID corresponding to a JVMPI_GC_FINISH event.
static int ADAPTJ_GC_START
          The AdaptJ Event Type ID corresponding to a JVMPI_GC_START event.
static int ADAPTJ_HEAP_DUMP
          The AdaptJ Event Type ID corresponding to a JVMPI_HEAP_DUMP event.
static int ADAPTJ_INSTRUCTION_START
          The AdaptJ Event Type ID corresponding to a JVMPI_INSTRUCTION_START event.
static int ADAPTJ_JNI_GLOBALREF_ALLOC
          The AdaptJ Event Type ID corresponding to a JVMPI_JNI_GLOBALREF_ALLOC event.
static int ADAPTJ_JNI_GLOBALREF_FREE
          The AdaptJ Event Type ID corresponding to a JVMPI_JNI_GLOBALREF_FREE event.
static int ADAPTJ_JNI_WEAK_GLOBALREF_ALLOC
          The AdaptJ Event Type ID corresponding to a JVMPI_JNI_WEAK_GLOBALREF_ALLOC event.
static int ADAPTJ_JNI_WEAK_GLOBALREF_FREE
          The AdaptJ Event Type ID corresponding to a JVMPI_JNI_WAEK_GLOBALREF_FREE event.
static int ADAPTJ_JVM_INIT_DONE
          The AdaptJ Event Type ID corresponding to a JVMPI_JVM_INIT_DONE event.
static int ADAPTJ_JVM_SHUT_DOWN
          The AdaptJ Event Type ID corresponding to a JVMPI_JVM_SHUT_DOWN event.
static int ADAPTJ_METHOD_ENTRY
          The AdaptJ Event Type ID corresponding to a JVMPI_METHOD_ENTRY event.
static int ADAPTJ_METHOD_ENTRY2
          The AdaptJ Event Type ID corresponding to a JVMPI_METHOD_ENTRY2 event.
static int ADAPTJ_METHOD_EXIT
          The AdaptJ Event Type ID corresponding to a JVMPI_METHOD_EXIT event.
static int ADAPTJ_MONITOR_CONTENDED_ENTER
          The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_CONTENDED_ENTER event.
static int ADAPTJ_MONITOR_CONTENDED_ENTERED
          The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_CONTENDED_ENTERED event.
static int ADAPTJ_MONITOR_CONTENDED_EXIT
          The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_CONTENDED_EXIT event.
static int ADAPTJ_MONITOR_DUMP
          The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_DUMP event.
static int ADAPTJ_MONITOR_WAIT
          The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_WAIT event.
static int ADAPTJ_MONITOR_WAITED
          The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_WAITED event.
static int ADAPTJ_OBJECT_ALLOC
          The AdaptJ Event Type ID corresponding to a JVMPI_OBJECT_ALLOC event.
static int ADAPTJ_OBJECT_DUMP
          The AdaptJ Event Type ID corresponding to a JVMPI_OBJECT_DUMP event.
static int ADAPTJ_OBJECT_FREE
          The AdaptJ Event Type ID corresponding to a JVMPI_OBJECT_FREE event.
static int ADAPTJ_OBJECT_MOVE
          The AdaptJ Event Type ID corresponding to a JVMPI_OBJECT_MOVE event.
static int ADAPTJ_RAW_MONITOR_CONTENDED_ENTER
          The AdaptJ Event Type ID corresponding to a JVMPI_RAW_MONITOR_CONTENDED_ENTER event.
static int ADAPTJ_RAW_MONITOR_CONTENDED_ENTERED
          The AdaptJ Event Type ID corresponding to a JVMPI_RAW_MONITOR_CONTENDED_ENTERED event.
static int ADAPTJ_RAW_MONITOR_CONTENDED_EXIT
          The AdaptJ Event Type ID corresponding to a JVMPI_RAW_MONITOR_CONTENDED_EXIT event.
static int ADAPTJ_REQUESTED_EVENT
          The mask to be applied to an event ID in order to determine whether it was requested.
static int ADAPTJ_THREAD_END
          The AdaptJ Event Type ID corresponding to a JVMPI_THREAD_END event.
static int ADAPTJ_THREAD_START
          The AdaptJ Event Type ID corresponding to a JVMPI_THREAD_START event.
static int ADAPTJ_THREAD_STATUS_CHANGE
           
static int ADAPTJ_UNKNOWN
          The AdaptJ Event Type ID indicating an unknown event or an error.
 
Fields inherited from interface adaptj.spec.AdaptJSpecConstants
ADAPTJ_COMPACT_INSTRUCTION_START, ADAPTJ_FIELD_ARENA_ID, ADAPTJ_FIELD_ARENA_NAME, ADAPTJ_FIELD_CHOSEN_PAIR_INDEX, ADAPTJ_FIELD_CLASS_LOAD_CLASS_ID, ADAPTJ_FIELD_CLASS_NAME, ADAPTJ_FIELD_CLASS_UNLOAD_CLASS_ID, ADAPTJ_FIELD_CODE, ADAPTJ_FIELD_CODE_SIZE, ADAPTJ_FIELD_COUNTED, ADAPTJ_FIELD_DATA, ADAPTJ_FIELD_DATA_LEN, ADAPTJ_FIELD_ENV_ID, ADAPTJ_FIELD_GROUP_NAME, ADAPTJ_FIELD_HI, ADAPTJ_FIELD_ID, ADAPTJ_FIELD_INSTANCES, ADAPTJ_FIELD_IS_ARRAY, ADAPTJ_FIELD_IS_TRUE, ADAPTJ_FIELD_KEY, ADAPTJ_FIELD_LINENO_TABLE, ADAPTJ_FIELD_LINENO_TABLE_SIZE, ADAPTJ_FIELD_LOW, ADAPTJ_FIELD_METHOD_ID, ADAPTJ_FIELD_METHODS, ADAPTJ_FIELD_NAME, ADAPTJ_FIELD_NEW_ARENA_ID, ADAPTJ_FIELD_NEW_OBJ_ID, ADAPTJ_FIELD_NEW_STATUS, ADAPTJ_FIELD_NUM_INSTANCE_FIELDS, ADAPTJ_FIELD_NUM_INTERFACES, ADAPTJ_FIELD_NUM_METHODS, ADAPTJ_FIELD_NUM_STATIC_FIELDS, ADAPTJ_FIELD_NUM_TRACES, ADAPTJ_FIELD_OBJ_ID, ADAPTJ_FIELD_OBJECT, ADAPTJ_FIELD_OBJECT_ALLOC_CLASS_ID, ADAPTJ_FIELD_OFFSET, ADAPTJ_FIELD_PAIRS_TOTAL, ADAPTJ_FIELD_PARENT_NAME, ADAPTJ_FIELD_RECORDED, ADAPTJ_FIELD_REF_ID, ADAPTJ_FIELD_SIZE, ADAPTJ_FIELD_SOURCE_NAME, ADAPTJ_FIELD_STATICS, ADAPTJ_FIELD_THREAD_ENV_ID, ADAPTJ_FIELD_THREAD_ID, ADAPTJ_FIELD_THREAD_NAME, ADAPTJ_FIELD_TIMEOUT, ADAPTJ_FIELD_TOTAL_OBJECT_SPACE, ADAPTJ_FIELD_TRACES, ADAPTJ_FIELD_USED_OBJECT_SPACE, ADAPTJ_FIELD_USED_OBJECTS, ADAPTJ_FILESPLIT, ADAPTJ_ISPIPED, ADAPTJ_MAGIC, ADAPTJ_SPEC_MAGIC, VERSION_MASK
 
Constructor Summary
AdaptJEvent()
           
 
Method Summary
 int getEnvID()
          Get env_id.
 byte getTypeID()
          Get typeID.
 boolean isRequested()
          Get requested.
 void readFromStream(java.io.DataInput in, short info)
           
 void setEnvID(int env_id)
          Set env_id.
 void setRequested(boolean requested)
          Set requested.
 void setTypeID(byte typeID)
          Set typeID.
(package private)  void setTypeID(int typeID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADAPTJ_EVENT_COUNT

public static final int ADAPTJ_EVENT_COUNT
The total number of events that are known to the AdaptJ framework. The index of the last event must be AdaptJ - 1. Valid Event Type IDs range from 0 AdaptJ - 1, which allows their use as array indices.

See Also:
Constant Field Values

ADAPTJ_REQUESTED_EVENT

public static final int ADAPTJ_REQUESTED_EVENT
The mask to be applied to an event ID in order to determine whether it was requested.

See Also:
Constant Field Values

ADAPTJ_UNKNOWN

public static final int ADAPTJ_UNKNOWN
The AdaptJ Event Type ID indicating an unknown event or an error.

See Also:
Constant Field Values

ADAPTJ_ARENA_DELETE

public static final int ADAPTJ_ARENA_DELETE
The AdaptJ Event Type ID corresponding to a JVMPI_ARENA_DELETE event.

See Also:
Constant Field Values

ADAPTJ_ARENA_NEW

public static final int ADAPTJ_ARENA_NEW
The AdaptJ Event Type ID corresponding to a JVMPI_ARENA_NEW event.

See Also:
Constant Field Values

ADAPTJ_CLASS_LOAD

public static final int ADAPTJ_CLASS_LOAD
The AdaptJ Event Type ID corresponding to a JVMPI_CLASS_LOAD event.

See Also:
Constant Field Values

ADAPTJ_CLASS_LOAD_HOOK

public static final int ADAPTJ_CLASS_LOAD_HOOK
The AdaptJ Event Type ID corresponding to a JVMPI_CLASS_LOAD_HOOK event.

See Also:
Constant Field Values

ADAPTJ_CLASS_UNLOAD

public static final int ADAPTJ_CLASS_UNLOAD
The AdaptJ Event Type ID corresponding to a JVMPI_CLASS_UNLOAD event.

See Also:
Constant Field Values

ADAPTJ_COMPILED_METHOD_LOAD

public static final int ADAPTJ_COMPILED_METHOD_LOAD
The AdaptJ Event Type ID corresponding to a JVMPI_COMPILED_METHOD_LOAD event.

See Also:
Constant Field Values

ADAPTJ_COMPILED_METHOD_UNLOAD

public static final int ADAPTJ_COMPILED_METHOD_UNLOAD
The AdaptJ Event Type ID corresponding to a JVMPI_COMPILED_METHOD_UNLOAD event.

See Also:
Constant Field Values

ADAPTJ_DATA_DUMP_REQUEST

public static final int ADAPTJ_DATA_DUMP_REQUEST
The AdaptJ Event Type ID corresponding to a JVMPI_DATA_DUMP_REQUEST event.

See Also:
Constant Field Values

ADAPTJ_DATA_RESET_REQUEST

public static final int ADAPTJ_DATA_RESET_REQUEST
The AdaptJ Event Type ID corresponding to a JVMPI_DATA_RESET_REQUEST event.

See Also:
Constant Field Values

ADAPTJ_GC_FINISH

public static final int ADAPTJ_GC_FINISH
The AdaptJ Event Type ID corresponding to a JVMPI_GC_FINISH event.

See Also:
Constant Field Values

ADAPTJ_GC_START

public static final int ADAPTJ_GC_START
The AdaptJ Event Type ID corresponding to a JVMPI_GC_START event.

See Also:
Constant Field Values

ADAPTJ_HEAP_DUMP

public static final int ADAPTJ_HEAP_DUMP
The AdaptJ Event Type ID corresponding to a JVMPI_HEAP_DUMP event.

See Also:
Constant Field Values

ADAPTJ_JNI_GLOBALREF_ALLOC

public static final int ADAPTJ_JNI_GLOBALREF_ALLOC
The AdaptJ Event Type ID corresponding to a JVMPI_JNI_GLOBALREF_ALLOC event.

See Also:
Constant Field Values

ADAPTJ_JNI_GLOBALREF_FREE

public static final int ADAPTJ_JNI_GLOBALREF_FREE
The AdaptJ Event Type ID corresponding to a JVMPI_JNI_GLOBALREF_FREE event.

See Also:
Constant Field Values

ADAPTJ_JNI_WEAK_GLOBALREF_ALLOC

public static final int ADAPTJ_JNI_WEAK_GLOBALREF_ALLOC
The AdaptJ Event Type ID corresponding to a JVMPI_JNI_WEAK_GLOBALREF_ALLOC event.

See Also:
Constant Field Values

ADAPTJ_JNI_WEAK_GLOBALREF_FREE

public static final int ADAPTJ_JNI_WEAK_GLOBALREF_FREE
The AdaptJ Event Type ID corresponding to a JVMPI_JNI_WAEK_GLOBALREF_FREE event.

See Also:
Constant Field Values

ADAPTJ_JVM_INIT_DONE

public static final int ADAPTJ_JVM_INIT_DONE
The AdaptJ Event Type ID corresponding to a JVMPI_JVM_INIT_DONE event.

See Also:
Constant Field Values

ADAPTJ_JVM_SHUT_DOWN

public static final int ADAPTJ_JVM_SHUT_DOWN
The AdaptJ Event Type ID corresponding to a JVMPI_JVM_SHUT_DOWN event.

See Also:
Constant Field Values

ADAPTJ_METHOD_ENTRY

public static final int ADAPTJ_METHOD_ENTRY
The AdaptJ Event Type ID corresponding to a JVMPI_METHOD_ENTRY event.

See Also:
Constant Field Values

ADAPTJ_METHOD_ENTRY2

public static final int ADAPTJ_METHOD_ENTRY2
The AdaptJ Event Type ID corresponding to a JVMPI_METHOD_ENTRY2 event.

See Also:
Constant Field Values

ADAPTJ_METHOD_EXIT

public static final int ADAPTJ_METHOD_EXIT
The AdaptJ Event Type ID corresponding to a JVMPI_METHOD_EXIT event.

See Also:
Constant Field Values

ADAPTJ_MONITOR_CONTENDED_ENTER

public static final int ADAPTJ_MONITOR_CONTENDED_ENTER
The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_CONTENDED_ENTER event.

See Also:
Constant Field Values

ADAPTJ_MONITOR_CONTENDED_ENTERED

public static final int ADAPTJ_MONITOR_CONTENDED_ENTERED
The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_CONTENDED_ENTERED event.

See Also:
Constant Field Values

ADAPTJ_MONITOR_CONTENDED_EXIT

public static final int ADAPTJ_MONITOR_CONTENDED_EXIT
The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_CONTENDED_EXIT event.

See Also:
Constant Field Values

ADAPTJ_MONITOR_DUMP

public static final int ADAPTJ_MONITOR_DUMP
The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_DUMP event.

See Also:
Constant Field Values

ADAPTJ_MONITOR_WAIT

public static final int ADAPTJ_MONITOR_WAIT
The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_WAIT event.

See Also:
Constant Field Values

ADAPTJ_MONITOR_WAITED

public static final int ADAPTJ_MONITOR_WAITED
The AdaptJ Event Type ID corresponding to a JVMPI_MONITOR_WAITED event.

See Also:
Constant Field Values

ADAPTJ_OBJECT_ALLOC

public static final int ADAPTJ_OBJECT_ALLOC
The AdaptJ Event Type ID corresponding to a JVMPI_OBJECT_ALLOC event.

See Also:
Constant Field Values

ADAPTJ_OBJECT_DUMP

public static final int ADAPTJ_OBJECT_DUMP
The AdaptJ Event Type ID corresponding to a JVMPI_OBJECT_DUMP event.

See Also:
Constant Field Values

ADAPTJ_OBJECT_FREE

public static final int ADAPTJ_OBJECT_FREE
The AdaptJ Event Type ID corresponding to a JVMPI_OBJECT_FREE event.

See Also:
Constant Field Values

ADAPTJ_OBJECT_MOVE

public static final int ADAPTJ_OBJECT_MOVE
The AdaptJ Event Type ID corresponding to a JVMPI_OBJECT_MOVE event.

See Also:
Constant Field Values

ADAPTJ_RAW_MONITOR_CONTENDED_ENTER

public static final int ADAPTJ_RAW_MONITOR_CONTENDED_ENTER
The AdaptJ Event Type ID corresponding to a JVMPI_RAW_MONITOR_CONTENDED_ENTER event.

See Also:
Constant Field Values

ADAPTJ_RAW_MONITOR_CONTENDED_ENTERED

public static final int ADAPTJ_RAW_MONITOR_CONTENDED_ENTERED
The AdaptJ Event Type ID corresponding to a JVMPI_RAW_MONITOR_CONTENDED_ENTERED event.

See Also:
Constant Field Values

ADAPTJ_RAW_MONITOR_CONTENDED_EXIT

public static final int ADAPTJ_RAW_MONITOR_CONTENDED_EXIT
The AdaptJ Event Type ID corresponding to a JVMPI_RAW_MONITOR_CONTENDED_EXIT event.

See Also:
Constant Field Values

ADAPTJ_THREAD_END

public static final int ADAPTJ_THREAD_END
The AdaptJ Event Type ID corresponding to a JVMPI_THREAD_END event.

See Also:
Constant Field Values

ADAPTJ_THREAD_START

public static final int ADAPTJ_THREAD_START
The AdaptJ Event Type ID corresponding to a JVMPI_THREAD_START event.

See Also:
Constant Field Values

ADAPTJ_INSTRUCTION_START

public static final int ADAPTJ_INSTRUCTION_START
The AdaptJ Event Type ID corresponding to a JVMPI_INSTRUCTION_START event.

See Also:
Constant Field Values

ADAPTJ_THREAD_STATUS_CHANGE

public static final int ADAPTJ_THREAD_STATUS_CHANGE
See Also:
Constant Field Values
Constructor Detail

AdaptJEvent

public AdaptJEvent()
Method Detail

getEnvID

public int getEnvID()
Get env_id.

Returns:
env_id as int.

setEnvID

public void setEnvID(int env_id)
Set env_id.

Parameters:
env_id - the value to set.

getTypeID

public byte getTypeID()
Get typeID.

Returns:
typeID as byte.

setTypeID

public void setTypeID(byte typeID)
Set typeID.

Parameters:
typeID - the value to set.

setTypeID

void setTypeID(int typeID)

isRequested

public boolean isRequested()
Get requested.

Returns:
requested as boolean.

setRequested

public void setRequested(boolean requested)
Set requested.

Parameters:
requested - the value to set.

readFromStream

public void readFromStream(java.io.DataInput in,
                           short info)
                    throws java.io.IOException
java.io.IOException