DCT Lightfoot v3 API specification

java.lang
Class Thread

java.lang.Object
  |
  +--java.lang.Thread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
LightfootThread, MainTask, Timer

public class Thread
extends Object
implements Runnable


Field Summary
static int MAX_PRIORITY
          The maximum possible priority
static int MIN_PRIORITY
          The minimum possible priority
static int NORM_PRIORITY
          The normal priority
 
Constructor Summary
  Thread()
          Create a new thread
protected Thread(int size, java.lang.String name)
          Create a new thread using the specified size for the stack
  Thread(Runnable r)
          Create a new thread using a runnable object
  Thread(Runnable r, java.lang.String name)
          Create a new thread using a runnable object and name
  Thread(java.lang.String name)
          Create a new thread with a name
 
Method Summary
static int activeCount()
          Get the count of native threads in the VM
static Thread currentThread()
          Get the current thread reference
 java.lang.String getName()
          Get the name of the thread
 int getPriority()
          Get the priority of the thread
 boolean isAlive()
          Test to see if the thread is alive
 void join()
          Wait for this thread to die
 void run()
          Run - main task
 void setPriority(int newPriority)
          Set the priority
static void sleep(long ms)
          Sleep for a period of time
 void start()
          start the thread
 java.lang.String toString()
          Convert to a string
static void yield()
          yield to allow other threads some control
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_PRIORITY

public static final int MAX_PRIORITY
The maximum possible priority

See Also:
Constant Field Values

MIN_PRIORITY

public static final int MIN_PRIORITY
The minimum possible priority

See Also:
Constant Field Values

NORM_PRIORITY

public static final int NORM_PRIORITY
The normal priority

See Also:
Constant Field Values
Constructor Detail

Thread

public Thread()
Create a new thread


Thread

public Thread(java.lang.String name)
Create a new thread with a name

Parameters:
name - The name of the thread

Thread

protected Thread(int size,
                 java.lang.String name)
Create a new thread using the specified size for the stack

Parameters:
name - The name

Thread

public Thread(Runnable r)
Create a new thread using a runnable object

Parameters:
r - The runnable object

Thread

public Thread(Runnable r,
              java.lang.String name)
Create a new thread using a runnable object and name

Parameters:
r - The runnable object
name - The name
Method Detail

yield

public static void yield()
yield to allow other threads some control


sleep

public static void sleep(long ms)
                  throws InterruptedException
Sleep for a period of time

Parameters:
ms - The time to sleep in milliseconds
InterruptedException

start

public void start()
start the thread


run

public void run()
Run - main task

Specified by:
run in interface Runnable

isAlive

public final boolean isAlive()
Test to see if the thread is alive

Returns:
true if it is

setPriority

public final void setPriority(int newPriority)
Set the priority

Parameters:
newPriority - The new priority

getPriority

public final int getPriority()
Get the priority of the thread

Returns:
the priority

join

public final void join()
                throws InterruptedException
Wait for this thread to die

InterruptedException

getName

public final java.lang.String getName()
Get the name of the thread

Returns:
the name

toString

public java.lang.String toString()
Convert to a string

Overrides:
toString in class Object
Returns:
the string

currentThread

public static Thread currentThread()
Get the current thread reference

Returns:
the current thread

activeCount

public static int activeCount()
Get the count of native threads in the VM

Returns:
the number of active threads

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification