Purple Code

com.purpletech.util
Interface ThreadWatcher

All Known Implementing Classes:
BasicThreadWatcher

public interface ThreadWatcher

Watches threads.


Field Summary
static int IDLE
          blocked on something like an input queue -- waiting to be awakened
static int RUNNING
          actively doing its thing (or blocked trying)
static java.lang.String[] states
           
static int STOPPED
          stopped running
 
Method Summary
 void set(java.lang.String note)
          register that the current thread is now running, and doing something interesting, represented by the note param.
 void set(java.lang.Thread t, int state, java.lang.String note)
           
 void setIdle()
          register that the current thread is now idle (which means it's OK if it's blocked, waiting on IO for example)
 

Field Detail

IDLE

public static final int IDLE
blocked on something like an input queue -- waiting to be awakened

See Also:
Constant Field Values

RUNNING

public static final int RUNNING
actively doing its thing (or blocked trying)

See Also:
Constant Field Values

STOPPED

public static final int STOPPED
stopped running

See Also:
Constant Field Values

states

public static final java.lang.String[] states
Method Detail

set

public void set(java.lang.Thread t,
                int state,
                java.lang.String note)
Parameters:
t - the thread we are watching
state - the state constant
note - what the thread is doing

setIdle

public void setIdle()
register that the current thread is now idle (which means it's OK if it's blocked, waiting on IO for example)


set

public void set(java.lang.String note)
register that the current thread is now running, and doing something interesting, represented by the note param. It would be bad if it blocked now.


Documentation generated March 5 2003