org.PingOO.DLAI.lib.util
Class PThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.PingOO.DLAI.lib.util.PThread
Direct Known Subclasses:
BusyMonitor.BusyComponent.MonitorThread

public class PThread
extends java.lang.Thread

Threads to be used in this program.

Since:
PingOO 2.0
Version:
2.0
Author:
Fabrice Bouyé (bouye@cur-archamps.fr)
See Also:
Thread, ThreadGroup

Field Summary
private static int THREAD_COUNT
          The current nulber of existing threads.
static java.lang.String THREAD_IDENTIFIER
          String used to create a name for PingOO thrads initialized witout a name.
private static int THREAD_NUMBER
          The thread number generator.
private  int threadIdentifier
          The unique identifier of the current thread.
 
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadQ, values
 
Constructor Summary
PThread()
          Allocates a new Thread object.
PThread(PThreadGroup group, java.lang.Runnable target)
          Allocates a new Thread object.
PThread(PThreadGroup group, java.lang.Runnable target, java.lang.String name)
          Allocates a new Thread object so that it has target as its run object, has the specified name as its name, and belongs to the thread group referred to by group.
PThread(PThreadGroup group, java.lang.String name)
          Allocates a new Thread object.
PThread(java.lang.Runnable target)
          Allocates a new Thread object.
PThread(java.lang.Runnable target, java.lang.String name)
          Allocates a new Thread object.
PThread(java.lang.String name)
          Allocates a new Thread object.
 
Method Summary
protected  void finalize()
          Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
static int getInstanceNumber()
          Returns the number identifier of the last instancied thread.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, run, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, yield
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

THREAD_IDENTIFIER

public static final java.lang.String THREAD_IDENTIFIER
String used to create a name for PingOO thrads initialized witout a name.

THREAD_NUMBER

private static int THREAD_NUMBER
The thread number generator.

THREAD_COUNT

private static int THREAD_COUNT
The current nulber of existing threads.

threadIdentifier

private int threadIdentifier
The unique identifier of the current thread.
Constructor Detail

PThread

public PThread()
Allocates a new Thread object.

PThread

public PThread(java.lang.Runnable target)
Allocates a new Thread object.
Parameters:
target - The object whose run method is called.

PThread

public PThread(java.lang.Runnable target,
               java.lang.String name)
Allocates a new Thread object.
Parameters:
target - The object whose run method is called.
name - The name of the new thread.

PThread

public PThread(java.lang.String name)
Allocates a new Thread object.
Parameters:
name - The name of the new thread.

PThread

public PThread(PThreadGroup group,
               java.lang.Runnable target)
Allocates a new Thread object.
Parameters:
group - The thread group.
target - The object whose run method is called.

PThread

public PThread(PThreadGroup group,
               java.lang.String name)
Allocates a new Thread object.
Parameters:
group - The thread group.
name - The name of the new thread.

PThread

public PThread(PThreadGroup group,
               java.lang.Runnable target,
               java.lang.String name)
Allocates a new Thread object so that it has target as its run object, has the specified name as its name, and belongs to the thread group referred to by group.
Parameters:
group - The thread group.
target - The object whose run method is called.
name - The name of the new thread.
Method Detail

getInstanceNumber

public static int getInstanceNumber()
Returns the number identifier of the last instancied thread.
Returns:
The number identifier of the last instancied thread.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Thread

finalize

protected void finalize()
                 throws java.lang.Throwable
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
Overrides:
finalize in class java.lang.Object