# com.bea.ide.debug
IDebugThread Interface

public interface IDebugThread

This is the interfaces for a user thread that is being shown in the IDE.

## Field Summary

`public static final `String`` | `PROP_NAME` The property that holds the thread's name.
`public static final `String`` | `PROP_STACK_FRAMES` The property that holds the stack frames for the thread.

## Method Summary

`public void` | `addPropertyChangeListener`(`String` propertyName, `PropertyChangeListener` listener) This adds a property change listener, that will be called back whenever the specified property changes.
`public long` | `getId`() Gets the unique thread id.
`public `String`` | `getName`() Gets the thread name.
`public `IDebugStackFrame`[]` | `getStackFrames`() This gets the array of stack frames we are using to for this thread.
`public void` | `removePropertyChangeListener`(`String` propertyName, `PropertyChangeListener` listener) This removes a property change listener that was added by `IDebugThread.addPropertyChangeListener(String, PropertyChangeListener)```.
`public void` | `setId`(long threadId) Sets the unique thread id.
`public void` | `setName`(`String` name) Sets the thread name.
`public void` | `setStackFrames`(`IDebugStackFrame`[] stackFrames) This sets the array of stack frames that will be used for displaying in the threads window and the stack window.

## Field Detail

### PROP_NAME

    public static final String PROP_NAME

  The property that holds the thread's name.

### PROP_STACK_FRAMES

    public static final String PROP_STACK_FRAMES

  The property that holds the stack frames for the thread.

## Method Detail

### addPropertyChangeListener(String, PropertyChangeListener) Method

    public void addPropertyChangeListener(String propertyName,
                                          PropertyChangeListener listener)

This adds a property change listener, that will be called back whenever the specified property changes.

#### Parameters

propertyName
  the property to listen on.

listener
  the listener object that will get called back.

### getId() Method

    public long getId()

Gets the unique thread id. This id is used for communication between the debugger proxy and the UI.

#### Returns

the thread's unique id

### getName() Method

    public String getName()

Gets the thread name.

#### Returns

the thread name.

### getStackFrames() Method

    public IDebugStackFrame[] getStackFrames()

This gets the array of stack frames we are using to for this thread. These are the same stack frames we are using to display the call stack and thread frames.

#### Returns

an array of `IDebugStackFrame```

### removePropertyChangeListener(String, PropertyChangeListener) Method

    public void removePropertyChangeListener(String propertyName,
                                             PropertyChangeListener listener)

This removes a property change listener that was added by `IDebugThread.addPropertyChangeListener(String, PropertyChangeListener)```.

#### Parameters

propertyName
  the property being listened to

listener
  the listener object that was registered.

### setId(long) Method

    public void setId(long threadId)

Sets the unique thread id. Consumers should be very careful about calling this, since this id is used in communication with the debugger proxy.

#### Parameters

threadId
  the new thread id

### setName(String) Method

    public void setName(String name)

Sets the thread name.

#### Parameters

name
  the new name for the thread

### setStackFrames(IDebugStackFrame[]) Method

    public void setStackFrames(IDebugStackFrame[] stackFrames)

This sets the array of stack frames that will be used for displaying in the threads window and the stack window.

#### Parameters

stackFrames
  the new array of stack frames for this thread.