org.erights.e.extern.timer
Class Timeout

java.lang.Object
  |
  +--org.erights.e.extern.timer.TimerWatcher
        |
        +--org.erights.e.extern.timer.Timeout
All Implemented Interfaces:
Runnable

public class Timeout
extends TimerWatcher
implements Runnable

Untamed:


Field Summary
private  Message myMessage
           
private  Object myTarget
           
private  TimerThread myThread
           
private  Vat myVat
           
 
Constructor Summary
(package private) Timeout(TimerThread thread, Object target, Message msg)
          Creates a new Timeout object.
 
Method Summary
(package private)  void handleTimeout()
          Called by the timer thread when the timeout time comes.
 void run()
          Enabled: Cancels this timeout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myThread

private TimerThread myThread

myVat

private Vat myVat

myTarget

private Object myTarget

myMessage

private Message myMessage
Constructor Detail

Timeout

Timeout(TimerThread thread,
        Object target,
        Message msg)
Creates a new Timeout object.

Captures the current Vat, so must be called from within the vat-thread holding target.

Parameters:
thread - The timer thread responsible for us
target - The object to be notified at timeout time
Method Detail

run

public void run()
Enabled: Cancels this timeout. Note, however, that although a Timeout can be cancelled, there is no guarantee that it has not already occured at the time it is cancelled -- perhaps with the notification still in flight.

Specified by:
run in interface Runnable
See Also:
java.lang.Thread#run()

handleTimeout

void handleTimeout()
Called by the timer thread when the timeout time comes.

Specified by:
handleTimeout in class TimerWatcher


comments?