sofya.ed.semantic
Class EventListener.ThreadData

java.lang.Object
  extended by sofya.ed.semantic.EventListener.ThreadData
Enclosing interface:
EventListener

public static class EventListener.ThreadData
extends java.lang.Object

Provides information about the thread on which an observable event has occurred.


Method Summary
 int getId()
          Gets the unique integer identifier assigned to the thread by the event dispatching framework.
 java.lang.String getName()
          Gets the name of the thread, as reported by the JVM.
 EventListener.ObjectData getObject()
          Gets a handle to the thread object itself.
 long getObjectId()
          Gets the unique identifier associated with the thread object by the JVM.
 EventListener.ObjectData getRunnableTarget()
          Gets the runnable object that will be executed by this thread, if any.
 EventListener.ThreadStatus getStatus()
          Gets the thread's status, as reported by the JVM.
 gnu.trove.TLongHashSet ownedMonitorIds()
          Gets the IDs of all the objects whose monitors are held by this thread.
 EventListener.ObjectData[] ownedMonitors()
          Gets the monitors held by this thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getId

public int getId()
Gets the unique integer identifier assigned to the thread by the event dispatching framework.

Returns:
The thread's ID.

getObjectId

public long getObjectId()
Gets the unique identifier associated with the thread object by the JVM. This may be relevant if, for example, the thread is assigned to a field somewhere.

This method will succeed even if the thread has stopped running and/or has been garbage collected.

Returns:
A unique identifier associated with the mirrored thread.

getName

public java.lang.String getName()
Gets the name of the thread, as reported by the JVM.

Returns:
The thread's name.

getStatus

public EventListener.ThreadStatus getStatus()
Gets the thread's status, as reported by the JVM.

Returns:
The thread's status.

getRunnableTarget

public EventListener.ObjectData getRunnableTarget()
Gets the runnable object that will be executed by this thread, if any. That is, the object implementating the Runnable interface that is the target to be executed by this thread.

Returns:
The runnable object to be executed by this thread, or null if no runnable target was specified for this thread (e.g. if it is subclassed with an override of run()).

getObject

public EventListener.ObjectData getObject()
Gets a handle to the thread object itself.

Returns:
Object information for this thread, generally useful when the thread is an instance of a user-defined subclass of java.lang.Thread.

ownedMonitors

public EventListener.ObjectData[] ownedMonitors()
Gets the monitors held by this thread.

Returns:
The list of monitors acquired and not yet released by this thread.

ownedMonitorIds

public gnu.trove.TLongHashSet ownedMonitorIds()
Gets the IDs of all the objects whose monitors are held by this thread.

Returns:
The set of object IDs of monitors acquired and not yet released by this thread.