JavaScript Development Tools
Release 3.2

org.eclipse.wst.jsdt.debug.core.jsdi
Interface ThreadReference

All Superinterfaces:
Mirror

public interface ThreadReference
extends Mirror

Abstract description of a thread

Since:
1.0
Restriction:
This interface is not intended to be extended by clients.

Field Summary
static int THREAD_STATUS_MONITOR
          Constant indicating the thread is holding a monitor

Value is: 3
static int THREAD_STATUS_NOT_STARTED
          Constant indicating the thread has not been started

Value is: 5
static int THREAD_STATUS_RUNNING
          Constant indicating the thread is in a running state

Value is: 1
static int THREAD_STATUS_SLEEPING
          Constant indicating the thread is in a sleeping state

Value is: 2
static int THREAD_STATUS_UNKNOWN
          Constant indicating the state of the thread is unknown

Value is: -1
static int THREAD_STATUS_WAIT
          Constant indicating the thread is waiting for a monitor

Value is: 4
static int THREAD_STATUS_ZOMBIE
          Constant indicating the thread is in a zombie state

Value is: 0
 
Method Summary
 StackFrame frame(int index)
          Returns the stack frame for the given index in this thread.
 int frameCount()
          Returns the total stack frame count for this thread
 List frames()
          Returns the live list of stack frames for this thread.
 void interrupt()
          Send a request to interrupt this threads' execution.
 boolean isAtBreakpoint()
          Returns whether or not this thread is currently suspended on a breakpoint.
 boolean isSuspended()
          Returns if this thread is currently in a suspended state.
 String name()
          Returns the simple name of this thread.
 void resume()
          Sends a request to resume this thread, iff it is in the suspended state.
 int status()
          Returns the status of this thread.
 void suspend()
          Sends a request to suspend this thread, iff it is not already in a suspended state.
 
Methods inherited from interface org.eclipse.wst.jsdt.debug.core.jsdi.Mirror
virtualMachine
 

Field Detail

THREAD_STATUS_UNKNOWN

static final int THREAD_STATUS_UNKNOWN
Constant indicating the state of the thread is unknown

Value is: -1

See Also:
Constant Field Values

THREAD_STATUS_ZOMBIE

static final int THREAD_STATUS_ZOMBIE
Constant indicating the thread is in a zombie state

Value is: 0

See Also:
Constant Field Values

THREAD_STATUS_RUNNING

static final int THREAD_STATUS_RUNNING
Constant indicating the thread is in a running state

Value is: 1

See Also:
Constant Field Values

THREAD_STATUS_SLEEPING

static final int THREAD_STATUS_SLEEPING
Constant indicating the thread is in a sleeping state

Value is: 2

See Also:
Constant Field Values

THREAD_STATUS_MONITOR

static final int THREAD_STATUS_MONITOR
Constant indicating the thread is holding a monitor

Value is: 3

See Also:
Constant Field Values

THREAD_STATUS_WAIT

static final int THREAD_STATUS_WAIT
Constant indicating the thread is waiting for a monitor

Value is: 4

See Also:
Constant Field Values

THREAD_STATUS_NOT_STARTED

static final int THREAD_STATUS_NOT_STARTED
Constant indicating the thread has not been started

Value is: 5

See Also:
Constant Field Values
Method Detail

frameCount

int frameCount()
Returns the total stack frame count for this thread

Returns:
the total stack frame count

frame

StackFrame frame(int index)
Returns the stack frame for the given index in this thread.

This method can return null

Returns:
the stack frame at the given index or null

frames

List frames()
Returns the live list of stack frames for this thread.

This method cannot return null

Returns:
the list of stack frames from this thread or an empty list, never null

interrupt

void interrupt()
Send a request to interrupt this threads' execution.


resume

void resume()
Sends a request to resume this thread, iff it is in the suspended state.


suspend

void suspend()
Sends a request to suspend this thread, iff it is not already in a suspended state.


status

int status()
Returns the status of this thread.

Returns:
the status of this thread
See Also:
THREAD_STATUS_MONITOR, THREAD_STATUS_NOT_STARTED, THREAD_STATUS_RUNNING, THREAD_STATUS_SLEEPING, THREAD_STATUS_UNKNOWN, THREAD_STATUS_WAIT, THREAD_STATUS_ZOMBIE

isAtBreakpoint

boolean isAtBreakpoint()
Returns whether or not this thread is currently suspended on a breakpoint.

Returns:
true if the thread is suspended on a breakpoint false otherwise

isSuspended

boolean isSuspended()
Returns if this thread is currently in a suspended state.

Returns:
true if the thread is suspended false otherwise

name

String name()
Returns the simple name of this thread.

This method can return null

Returns:
the name of the thread or null

JavaScript Development Tools
Release 3.2

Copyright (c) IBM Corp. and others 2000, 2010. All Rights Reserved.