All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.nodeos.pj_Thread
java.lang.Object
   |
   +----edu.utah.janos.nodeos.pj_Thread

  Summary

class  pj_Thread
     extends java.lang.Object
{
          // Fields 3
     private final pj_Thread.ThreadWrapper jlThread;
     private Object obj;
     private final pj_ThreadPool threadPool;

          // Constructors 1
     pj_Thread(pj_ThreadPool, Runnable, String);

          // Methods 9
     static pj_Thread currentThread();
     static Object getObject();
     static pj_Thread self();
     static Object setObject(Object);
     static void sleep(long, int) throws InterruptedException;
     static void yieldTo(pj_Thread);

     pj_Flow getFlow();
     void start();
     public String toString();

          // Inner Classes 2
     private class pj_Thread.ThreadWrapper
     private static class pj_Thread.pj_ThreadInfo
}

A "Native" Thread.

A package-private wrapper for the "native" thread layer.

This is a simple wrapper for java.lang.Thread. Its mostly a separate class so I can cleanly subclass it without exposing all of the standard java.lang.Thread methods.

PART OF THE PURE JAVA NODEOS IMPLEMENTATION.

Author:
Janos Ministry of Development


  Cross Reference

Returned By:
pj_Thread.ThreadWrapper.pj_Thread(), pj_Thread.currentThread(), pj_Thread.self()





  Fields

· obj

Summary  |  Top
   private Object obj

Per-thread state.

This is part of the NodeOS spec. Probably doesn't need to be part of the Java-level interface (users of this should just subclass Janos Thread).


· threadPool

Summary  |  Top
   private final pj_ThreadPool threadPool

The ThreadPool this thread is a part of.


· jlThread

Summary  |  Top
   private final pj_Thread.ThreadWrapper jlThread


  Constructors

· pj_Thread

Summary  |  Top

   pj_Thread(pj_ThreadPool threadPool, 
             Runnable runnable, 
             String name) 

Create a new native thread. This constructor is used to only create "explicit" threads.

The given Runnable will be used when the thread is started (instead of the run method on this).



  Methods

· yieldTo

Summary  |  Top
   static void yieldTo(pj_Thread th) 


· sleep

Summary  |  Top
   static void sleep(long millis, 
                     int nanos)  throws InterruptedException


· getObject

Summary  |  Top
   static Object getObject() 


· setObject

Summary  |  Top
   static Object setObject(Object obj) 


· start

Summary  |  Top
   void start() 

Package-private run method that all *implicit* threads start in.



· getFlow

Summary  |  Top
   pj_Flow getFlow() 


· self

Summary  |  Top
   static pj_Thread self() 

Return the Thread object associated with the currently executing thread of control.

Returns:
a Thread object associated with the current thread.

See Also: currentThread



· currentThread

Summary  |  Top
   static pj_Thread currentThread() 

See Also: self



· toString

Summary  |  Top
   public String toString() 
Overrides:
toString in class Object


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7