java.lang
Class Thread

java.lang.Object
  |
  +--java.lang.Thread
All Implemented Interfaces:
Runnable

public synchronized class Thread
extends Object
implements Runnable


Field Summary
private  sun.nio.ch.Interruptible blocker
           
private  ClassLoader contextClassLoader
           
private  boolean daemon
           
private  long eetop
           
private  ThreadGroup group
           
(package private)  ThreadLocal.ThreadLocalMap inheritableThreadLocals
           
private  java.security.AccessControlContext inheritedAccessControlContext
           
static int MAX_PRIORITY
           
static int MIN_PRIORITY
           
private  char[] name
           
static int NORM_PRIORITY
           
private  int priority
           
private  boolean single_step
           
private  long stackSize
           
private  boolean stillborn
           
private static RuntimePermission stopThreadPermission
           
private  Runnable target
           
private static int threadInitNumber
           
(package private)  ThreadLocal.ThreadLocalMap threadLocals
           
private  Thread threadQ
           
 
Constructor Summary
Thread()
           
Thread(Runnable)
           
Thread(Runnable, String)
           
Thread(String)
           
Thread(ThreadGroup, Runnable)
           
Thread(ThreadGroup, Runnable, String)
           
Thread(ThreadGroup, Runnable, String, long)
           
Thread(ThreadGroup, String)
           
 
Method Summary
(package private) static void ()
           
static int activeCount()
           
private  void blockedOn(sun.nio.ch.Interruptible)
           
 void checkAccess()
           
 int countStackFrames()
           
static Thread currentThread()
           
 void destroy()
           
static void dumpStack()
           
static int enumerate(Thread[])
           
private  void exit()
           
 ClassLoader getContextClassLoader()
           
 String getName()
           
 int getPriority()
           
 ThreadGroup getThreadGroup()
           
static boolean holdsLock(Object)
           
private  void init(ThreadGroup, Runnable, String, long)
           
 void interrupt()
           
private  void interrupt0()
           
static boolean interrupted()
           
 boolean isAlive()
           
 boolean isDaemon()
           
 boolean isInterrupted()
           
private  boolean isInterrupted(boolean)
           
 void join()
           
 void join(long)
           
 void join(long, int)
           
private static int nextThreadNum()
           
private static void registerNatives()
           
 void resume()
           
private  void resume0()
           
 void run()
           
 void setContextClassLoader(ClassLoader)
           
 void setDaemon(boolean)
           
 void setName(String)
           
 void setPriority(int)
           
private  void setPriority0(int)
           
static void sleep(long)
           
static void sleep(long, int)
           
 void start()
           
 void stop()
           
 void stop(Throwable)
           
private  void stop0(Object)
           
 void suspend()
           
private  void suspend0()
           
 String toString()
           
static void yield()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private char[] name

priority

private int priority

threadQ

private Thread threadQ

eetop

private long eetop

single_step

private boolean single_step

daemon

private boolean daemon

stillborn

private boolean stillborn

target

private Runnable target

group

private ThreadGroup group

contextClassLoader

private ClassLoader contextClassLoader

inheritedAccessControlContext

private java.security.AccessControlContext inheritedAccessControlContext

threadInitNumber

private static int threadInitNumber

stopThreadPermission

private static RuntimePermission stopThreadPermission

threadLocals

ThreadLocal.ThreadLocalMap threadLocals

inheritableThreadLocals

ThreadLocal.ThreadLocalMap inheritableThreadLocals

stackSize

private long stackSize

blocker

private volatile sun.nio.ch.Interruptible blocker

MIN_PRIORITY

public static final int MIN_PRIORITY
See Also:
Constant Field Values

NORM_PRIORITY

public static final int NORM_PRIORITY
See Also:
Constant Field Values

MAX_PRIORITY

public static final int MAX_PRIORITY
See Also:
Constant Field Values
Constructor Detail

Thread

public Thread()

Thread

public Thread(Runnable)

Thread

public Thread(ThreadGroup,
              Runnable)

Thread

public Thread(String)

Thread

public Thread(ThreadGroup,
              String)

Thread

public Thread(Runnable,
              String)

Thread

public Thread(ThreadGroup,
              Runnable,
              String)

Thread

public Thread(ThreadGroup,
              Runnable,
              String,
              long)
Method Detail

registerNatives

private static void registerNatives()

nextThreadNum

private static int nextThreadNum()

blockedOn

private void blockedOn(sun.nio.ch.Interruptible)

currentThread

public static Thread currentThread()

yield

public static void yield()

sleep

public static void sleep(long)
                  throws InterruptedException
InterruptedException

sleep

public static void sleep(long,
                         int)
                  throws InterruptedException
InterruptedException

init

private void init(ThreadGroup,
                  Runnable,
                  String,
                  long)

start

public void start()

run

public void run()
Specified by:
run in interface Runnable

exit

private void exit()

stop

public final void stop()

stop

public final void stop(Throwable)

interrupt

public void interrupt()

interrupted

public static boolean interrupted()

isInterrupted

public boolean isInterrupted()

isInterrupted

private boolean isInterrupted(boolean)

destroy

public void destroy()

isAlive

public final boolean isAlive()

suspend

public final void suspend()

resume

public final void resume()

setPriority

public final void setPriority(int)

getPriority

public final int getPriority()

setName

public final void setName(String)

getName

public final String getName()

getThreadGroup

public final ThreadGroup getThreadGroup()

activeCount

public static int activeCount()

enumerate

public static int enumerate(Thread[])

countStackFrames

public int countStackFrames()

join

public final void join(long)
                throws InterruptedException
InterruptedException

join

public final void join(long,
                       int)
                throws InterruptedException
InterruptedException

join

public final void join()
                throws InterruptedException
InterruptedException

dumpStack

public static void dumpStack()

setDaemon

public final void setDaemon(boolean)

isDaemon

public final boolean isDaemon()

checkAccess

public final void checkAccess()

toString

public String toString()
Overrides:
toString in class Object

getContextClassLoader

public ClassLoader getContextClassLoader()

setContextClassLoader

public void setContextClassLoader(ClassLoader)

holdsLock

public static boolean holdsLock(Object)

setPriority0

private void setPriority0(int)

stop0

private void stop0(Object)

suspend0

private void suspend0()

resume0

private void resume0()

interrupt0

private void interrupt0()

static void ()