Thread.h

Go to the documentation of this file.
00001 #ifndef JAVA_LANG_THREAD_H
00002 #define JAVA_LANG_THREAD_H 1
00003 
00004 #ifndef JAVA_LANG_RUNNABLE_H
00005 #include <java_lang/Runnable.h>
00006 #endif /* JAVA_LANG_RUNNABLE_H */
00007 
00008 namespace java {
00009   namespace lang {
00010 
00099     class JAVA_LANG_SPEC Thread : virtual public Object, virtual public Runnable {
00100 
00101     public:
00102 
00106       static const jint TMIN_PRIORITY;
00107 
00111       static const jint TMAX_PRIORITY;
00112 
00116       static const jint TNORM_PRIORITY;
00117 
00123       static Thread& currentThread();
00124 
00129       static void yield();
00130 
00141       static void sleep(jlong millis);
00142 
00195       Thread(const Ref<Runnable>& target = 0);
00196       Thread(const Thread& src);
00197       Thread& operator=(const Thread&);
00198 
00213       virtual void start(const Ref<Runnable>& target);
00214 
00229       virtual void start();
00230     
00240       virtual void run();
00241 
00249       jboolean isAlive() const;
00250 
00267       void setPriority(jint newPriority);
00268 
00276       jint getPriority() const;
00277 
00287       void join(jlong millis = 0);
00288 
00294       virtual String toString() const;
00295 
00300       virtual void exit();
00301 
00302     private:
00303 
00304       ObjectRef impl;
00305       REGISTER_MEMBERS;
00306 
00307     };
00308 
00309   } // namespace lang
00310 } // namespace java
00311 
00312 #endif /* JAVA_LANG_THREAD_H */

Generated on Fri May 16 11:54:43 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3