Keel 2.1RC2

org.keel.clients.direct
Class MonitorForKeelDirectServer

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.keel.clients.direct.MonitorForKeelDirectServer
All Implemented Interfaces:
java.lang.Runnable

public class MonitorForKeelDirectServer
extends java.lang.Thread

Author:
pjbrown This class periodically calls thread.isAlive(); When it determines that thread is no longer alive, then it tells the keelDirectServer to exit it's thread, and then this thread exits itself. If thread.isAlive() is true, then this thread sleeps before awakening and trying again.

Field Summary
(package private)  java.lang.Class keelDirectServerClazz
           
(package private)  java.lang.Thread keelDirectServerInstance
           
(package private)  java.lang.Thread threadToWatch
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MonitorForKeelDirectServer()
          This thread periodically calls thread.isAlive(); When it determines that thread is no longer alive, then it tells the keelDirectServer to exit it's thread, and then this thread exits itself.
 
Method Summary
 void print(java.lang.String string)
          Causes text to appear on the std error.
 void run()
          Cause this thread to sleep until theThreadToWatch.isAlive() returns false...
 void setKeelDirectServer(java.lang.Thread keelDirectServer)
           
 void setKeelDirectServerClass(java.lang.Class theKeelDirectServerClazz)
           
 void setThreadToWatch(java.lang.Thread thread)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

threadToWatch

java.lang.Thread threadToWatch

keelDirectServerInstance

java.lang.Thread keelDirectServerInstance

keelDirectServerClazz

java.lang.Class keelDirectServerClazz
Constructor Detail

MonitorForKeelDirectServer

public MonitorForKeelDirectServer()
This thread periodically calls thread.isAlive(); When it determines that thread is no longer alive, then it tells the keelDirectServer to exit it's thread, and then this thread exits itself. If thread.isAlive() is true, then this thread sleeps before awakening and trying again.

Method Detail

run

public void run()
Cause this thread to sleep until theThreadToWatch.isAlive() returns false... at which point this method calls stopRuningKeelDirectServer() to tell the keelDirectServer thread to die, and then this thread dies itself. Do not start this thread until after you have started threadToWatch.


setThreadToWatch

public void setThreadToWatch(java.lang.Thread thread)
Parameters:
thread -

setKeelDirectServer

public void setKeelDirectServer(java.lang.Thread keelDirectServer)
Parameters:
keelDirectServer -

setKeelDirectServerClass

public void setKeelDirectServerClass(java.lang.Class theKeelDirectServerClazz)
Parameters:
theKeelDirectServerClazz -

print

public final void print(java.lang.String string)
Causes text to appear on the std error.

Parameters:
string -

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.