de.grogra.util
Class ThreadContext

java.lang.Object
  extended by de.grogra.util.ThreadContext

public final class ThreadContext
extends java.lang.Object


Field Summary
static short MAX_PRIORITY
           
static short MIN_PRIORITY
           
static short NORMAL_PRIORITY
           
 
Method Summary
 ThreadContext check()
           
 void checkInterruption()
           
static ThreadContext current()
           
 int getId()
           
 short getPriority()
           
 java.lang.Object getProperty(int propertyId)
           
 java.lang.Thread getThread()
           
 boolean hasHigherPriorityThan(ThreadContext o)
           
 boolean isCurrent()
           
 void join()
           
 void joinWhileExecuting(java.lang.Runnable r)
           
 void leave()
           
static int registerProperty()
           
 void setPriority(short priority)
           
 void setProperty(int propertyId, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_PRIORITY

public static final short MAX_PRIORITY
See Also:
Constant Field Values

MIN_PRIORITY

public static final short MIN_PRIORITY
See Also:
Constant Field Values

NORMAL_PRIORITY

public static final short NORMAL_PRIORITY
See Also:
Constant Field Values
Method Detail

check

public ThreadContext check()

checkInterruption

public void checkInterruption()
                       throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

current

public static ThreadContext current()

getId

public int getId()

getPriority

public short getPriority()

getProperty

public java.lang.Object getProperty(int propertyId)

getThread

public java.lang.Thread getThread()

hasHigherPriorityThan

public boolean hasHigherPriorityThan(ThreadContext o)

isCurrent

public boolean isCurrent()

join

public void join()

joinWhileExecuting

public void joinWhileExecuting(java.lang.Runnable r)

leave

public void leave()

registerProperty

public static int registerProperty()

setPriority

public void setPriority(short priority)

setProperty

public void setProperty(int propertyId,
                        java.lang.Object value)