Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.jvm
Interface ThreadSnapshot

All Superinterfaces:
  Describable

public interface ThreadSnapshot
extends Describable

Interface representing a snapshot of a thread's state at a given time. Note that when this object is created, the thread and state it represents may have died and been garbage collected already.

Author:
  Calle Wilund
, Marcus Hirt

Field Summary
`static int` | `THREAD_STATE_ACTIVE` Thread state for an active thread.
`static int` | `THREAD_STATE_IO` Thread state for a thread waiting for IO.
`static int` | `THREAD_STATE_LOCKED` Thread state for a locked thread.
`static int` | `THREAD_STATE_SUSPENDED` Thread state for a suspended thread.
`static int` | `THREAD_STATE_WAITING` Thread state for a thread waiting.

Method Summary
`java.lang.String` | `getDescription()` Returns the snapshot as a String.
`int` | `getID()` Returns the id of the thread that the snapshot was created for.
`java.lang.String` | `getName()` Returns the name of the thread that this snapshot was created from.
`int` | `getPriority()` Returns the priority level of the thread at the time of the snapshot.
`java.util.List` | `getStackTrace()` Returns a list of CallTraceElement.
`int` | `getState()` Returns the thread state (or as close as we can describe using the THREAD_STATE_ constants).
`boolean` | `isDaemon()` Returns true if this thread is a daemon thread.

Field Detail

### THREAD_STATE_ACTIVE

    public static final int THREAD_STATE_ACTIVE

  Thread state for an active thread.

  See Also:
    Constant Field Values

### THREAD_STATE_IO

    public static final int THREAD_STATE_IO

  Thread state for a thread waiting for IO.

  See Also:
    Constant Field Values

### THREAD_STATE_WAITING

    public static final int THREAD_STATE_WAITING

  Thread state for a thread waiting.

  See Also:
    Constant Field Values

### THREAD_STATE_LOCKED

    public static final int THREAD_STATE_LOCKED

  Thread state for a locked thread.

  See Also:
    Constant Field Values

### THREAD_STATE_SUSPENDED

    public static final int THREAD_STATE_SUSPENDED

  Thread state for a suspended thread.

  See Also:
    Constant Field Values

Method Detail

### getName

    public java.lang.String getName()

  Returns the name of the thread that this snapshot was created from.

  Returns:
    the name of the thread.

### getDescription

    public java.lang.String getDescription()

  Returns the snapshot as a String. This equals doing toString() on the snapshot.

  Specified by:
    `getDescription` in interface `Describable`
  Returns:
    the snapshot as a String.
  See Also:
    `Describable.getDescription()`

### getState

    public int getState()

  Returns the thread state (or as close as we can describe using the THREAD_STATE_ constants).

  Returns:
    the thread state.
  See Also:
    `THREAD_STATE_ACTIVE`, `THREAD_STATE_IO`, `THREAD_STATE_WAITING`, `THREAD_STATE_LOCKED`, `THREAD_STATE_SUSPENDED`

### getID

    public int getID()

  Returns the id of the thread that the snapshot was created for.

  Returns:
    the id of the thread.

### isDaemon

    public boolean isDaemon()

  Returns true if this thread is a daemon thread.

  Returns:
    true if this thread is a deamon thread.

### getPriority

    public int getPriority()

  Returns the priority level of the thread at the time of the snapshot.

  Returns:
    the priority level of the thread at the time of the snapshot.

### getStackTrace

    public java.util.List getStackTrace()

  Returns a list of CallTraceElement.

  Returns:
    a list of CallTraceElement.
  See Also:
    `CallTraceElement`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD