Java.Lang.Thread: Method Members

The methods of Java.Lang.Thread are listed below. For a list of all members, see the Thread Members list.

See Also: Inherited members from Java.Lang.Object

Public Methods

static
ActiveCount() : int
Returns the number of active Threads in the running Thread's group and its subgroups.
CheckAccess()
Does nothing.
CountStackFrames() : int
Returns the number of stack frames in this thread.
static
CurrentThread() : Thread
Returns the Thread of the caller, that is, the current Thread.
Destroy()
Throws UnsupportedOperationException.
static
DumpStack()
Prints to the standard error stream a text representation of the current stack for this Thread.
static
Enumerate(Thread[]) : int
Copies an array with all Threads which are in the same ThreadGroup as the receiver - and subgroups - into the array threads passed as parameter.
GetStackTrace() : StackTraceElement[]
Returns an array of Java.Lang.StackTraceElement representing the current thread's stack.
GetState() : Thread.State
Returns the current state of the Thread.
static
HoldsLock(Object) : bool
Indicates whether the current Thread has a monitor lock on the specified object.
Interrupt()
Posts an interrupt request to this Thread.
static
Interrupted() : bool
Returns a boolean indicating whether the current Thread ( currentThread()) has a pending interrupt request ( true) or not (false).
Join()
Blocks the current Thread (Thread.currentThread()) until the receiver finishes its execution and dies.
Join(long)
Blocks the current Thread (Thread.currentThread()) until the receiver finishes its execution and dies or the specified timeout expires, whatever happens first.
Join(long, int)
Blocks the current Thread (Thread.currentThread()) until the receiver finishes its execution and dies or the specified timeout expires, whatever happens first.
Resume()
Throws UnsupportedOperationException.
Run()
Calls the run() method of the Runnable object the receiver holds.
static
Sleep(long)
Causes the thread which sent this message to sleep for the given interval of time (given in milliseconds).
static
Sleep(long, int)
Causes the thread which sent this message to sleep for the given interval of time (given in milliseconds and nanoseconds).
Start()
Starts the new Thread of execution.
Stop()
Requests the receiver Thread to stop and throw ThreadDeath.
Stop(Throwable)
Throws UnsupportedOperationException.
Suspend()
Throws UnsupportedOperationException.
static
Yield()
Causes the calling Thread to yield execution time to another Thread that is ready to run.