Java Doc for Thread.java in  » Apache-Harmony-Java-SE » java-package » java » lang » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Thread

Thread
public class Thread implements Runnable(Code)

Inner Class :public enum State
Inner Class :public static interface UncaughtExceptionHandler

Field Summary
final public static  intMAX_PRIORITY
    
final public static  intMIN_PRIORITY
    
final public static  intNORM_PRIORITY
    
 ThreadGroupgroup
    
 booleanisAlive
     Indicates if the thread is alive.
 Objectlock
     Synchronization is done using internal lock.
static  ThreadGroupmainThreadGroup
     Main thread group.
 booleanstarted
    
static  ThreadGroupsystemThreadGroup
     System thread group for keeping helper threads.

Constructor Summary
public  Thread()
    
public  Thread(Runnable target)
    
public  Thread(Runnable target, String name)
    
public  Thread(String name)
    
public  Thread(ThreadGroup group, Runnable target)
    
public  Thread(ThreadGroup group, Runnable target, String name)
    
 Thread(ThreadGroup group, String name, long nativeAddr, long stackSize, int priority, boolean daemon)
     Creates a new thread object for the thread attached to VM.
public  Thread(ThreadGroup group, Runnable target, String name, long stackSize)
    
public  Thread(ThreadGroup group, String name)
    

Method Summary
public static  intactiveCount()
    
final public  voidcheckAccess()
    
public  intcountStackFrames()
    
public static  ThreadcurrentThread()
    
public  voiddestroy()
    
 voiddetach(Throwable uncaughtException)
     Performs premortal actions.
public static  voiddumpStack()
    
public static  intenumerate(Thread[] list)
    
public static  Map<Thread, StackTraceElement[]>getAllStackTraces()
    
public  ClassLoadergetContextClassLoader()
    
public static  UncaughtExceptionHandlergetDefaultUncaughtExceptionHandler()
    
public  longgetId()
    
final public  StringgetName()
    
final public  intgetPriority()
    
public  StackTraceElement[]getStackTrace()
    
public  Thread.StategetState()
    
final public  ThreadGroupgetThreadGroup()
    
 ObjectgetThreadLocal(ThreadLocal<Object> local)
     Returns the value associated with the ThreadLocal object specified.
public  UncaughtExceptionHandlergetUncaughtExceptionHandler()
    
public static  booleanholdsLock(Object object)
    
public  voidinterrupt()
    
public static  booleaninterrupted()
    
final public  booleanisAlive()
    
final public  booleanisDaemon()
    
public  booleanisInterrupted()
    
final public synchronized  voidjoin()
    
final public synchronized  voidjoin(long millis)
    
final public synchronized  voidjoin(long millis, int nanos)
    
 voidremoveLocalValue(ThreadLocal<Object> local)
     Removes the association (if any) between the ThreadLocal object given and this thread's value.
final public  voidresume()
    
public  voidrun()
    
 voidrunImpl()
    
public  voidsetContextClassLoader(ClassLoader classLoader)
    
final public  voidsetDaemon(boolean daemon)
    
public static  voidsetDefaultUncaughtExceptionHandler(UncaughtExceptionHandler eh)
    
final public  voidsetName(String name)
    
final public  voidsetPriority(int priority)
    
 voidsetThreadLocal(ThreadLocal<Object> local, Object value)
     Associates the value specified to the ThreadLocal object given.
public  voidsetUncaughtExceptionHandler(UncaughtExceptionHandler eh)
    
public static  voidsleep(long millis)
    
public static  voidsleep(long millis, int nanos)
    
public synchronized  voidstart()
    
final public  voidstop()
    
final public  voidstop(Throwable throwable)
    
final public  voidsuspend()
    
public  StringtoString()
    
public static  voidyield()
    

Field Detail
MAX_PRIORITY
final public static int MAX_PRIORITY(Code)



MIN_PRIORITY
final public static int MIN_PRIORITY(Code)



NORM_PRIORITY
final public static int NORM_PRIORITY(Code)



group
ThreadGroup group(Code)
This thread's thread group



isAlive
boolean isAlive(Code)
Indicates if the thread is alive.



lock
Object lock(Code)
Synchronization is done using internal lock.



mainThreadGroup
static ThreadGroup mainThreadGroup(Code)
Main thread group.



started
boolean started(Code)
Indicates if the thread was already started



systemThreadGroup
static ThreadGroup systemThreadGroup(Code)
System thread group for keeping helper threads.




Constructor Detail
Thread
public Thread()(Code)



Thread
public Thread(Runnable target)(Code)



Thread
public Thread(Runnable target, String name)(Code)



Thread
public Thread(String name)(Code)



Thread
public Thread(ThreadGroup group, Runnable target)(Code)



Thread
public Thread(ThreadGroup group, Runnable target, String name)(Code)



Thread
Thread(ThreadGroup group, String name, long nativeAddr, long stackSize, int priority, boolean daemon)(Code)
Creates a new thread object for the thread attached to VM. The first attached thread is the main thread.
Parameters:
  group - determines the thread group to place the thread in
Parameters:
  name - thread's name
Parameters:
  nativeAddr - address of the attached native thread
Parameters:
  stackeSize - size of the thread's stack
Parameters:
  priority - thread's priority
Parameters:
  daemon - true if the thread is daemon, false otherwise



Thread
public Thread(ThreadGroup group, Runnable target, String name, long stackSize)(Code)



Thread
public Thread(ThreadGroup group, String name)(Code)




Method Detail
activeCount
public static int activeCount()(Code)



checkAccess
final public void checkAccess()(Code)



countStackFrames
public int countStackFrames()(Code)



currentThread
public static Thread currentThread()(Code)



destroy
public void destroy()(Code)



detach
void detach(Throwable uncaughtException)(Code)
Performs premortal actions. First it processes uncaught exception if any. Second removes current thread from its thread group. VM calls this method when current thread is detaching from VM.
Parameters:
  uncaughtException - uncaught exception or null



dumpStack
public static void dumpStack()(Code)



enumerate
public static int enumerate(Thread[] list)(Code)



getAllStackTraces
public static Map<Thread, StackTraceElement[]> getAllStackTraces()(Code)



getContextClassLoader
public ClassLoader getContextClassLoader()(Code)



getDefaultUncaughtExceptionHandler
public static UncaughtExceptionHandler getDefaultUncaughtExceptionHandler()(Code)



getId
public long getId()(Code)



getName
final public String getName()(Code)



getPriority
final public int getPriority()(Code)



getStackTrace
public StackTraceElement[] getStackTrace()(Code)



getState
public Thread.State getState()(Code)



getThreadGroup
final public ThreadGroup getThreadGroup()(Code)



getThreadLocal
Object getThreadLocal(ThreadLocal<Object> local)(Code)
Returns the value associated with the ThreadLocal object specified. If no value is associated, returns the value produced by initialValue() method called for this object and associates this value to ThreadLocal object.
This nethod is designed to provide ThreadLocal functionality.



getUncaughtExceptionHandler
public UncaughtExceptionHandler getUncaughtExceptionHandler()(Code)



holdsLock
public static boolean holdsLock(Object object)(Code)



interrupt
public void interrupt()(Code)



interrupted
public static boolean interrupted()(Code)



isAlive
final public boolean isAlive()(Code)



isDaemon
final public boolean isDaemon()(Code)



isInterrupted
public boolean isInterrupted()(Code)



join
final public synchronized void join() throws InterruptedException(Code)



join
final public synchronized void join(long millis) throws InterruptedException(Code)



join
final public synchronized void join(long millis, int nanos) throws InterruptedException(Code)



removeLocalValue
void removeLocalValue(ThreadLocal<Object> local)(Code)
Removes the association (if any) between the ThreadLocal object given and this thread's value.
This nethod is designed to provide ThreadLocal functionality.



resume
final public void resume()(Code)
Note that this is unsnchronized - the assumption is that hythread does the synchronization for us



run
public void run()(Code)



runImpl
void runImpl()(Code)



setContextClassLoader
public void setContextClassLoader(ClassLoader classLoader)(Code)



setDaemon
final public void setDaemon(boolean daemon)(Code)



setDefaultUncaughtExceptionHandler
public static void setDefaultUncaughtExceptionHandler(UncaughtExceptionHandler eh)(Code)



setName
final public void setName(String name)(Code)

throws:
  NullPointerException - if new name is null



setPriority
final public void setPriority(int priority)(Code)



setThreadLocal
void setThreadLocal(ThreadLocal<Object> local, Object value)(Code)
Associates the value specified to the ThreadLocal object given.
This nethod is designed to provide ThreadLocal functionality.



setUncaughtExceptionHandler
public void setUncaughtExceptionHandler(UncaughtExceptionHandler eh)(Code)



sleep
public static void sleep(long millis) throws InterruptedException(Code)



sleep
public static void sleep(long millis, int nanos) throws InterruptedException(Code)



start
public synchronized void start()(Code)



stop
final public void stop()(Code)



stop
final public void stop(Throwable throwable)(Code)



suspend
final public void suspend()(Code)
Note that this is unsnchronized - the assumption is that hythread does the synchronization for us



toString
public String toString()(Code)



yield
public static void yield()(Code)



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.