util
Interface CancelRunnable

All Superinterfaces:
Runnable
All Known Subinterfaces:
Sequencing<E>
All Known Implementing Classes:
AbstractSequencer, CommandReceiver, DummySequencer, ErrorReceiver, ErrorServer, FitsParameterStub, LoopingSequencer, MasterMind, ParameterRelay, ParameterServer, ParameterStub, ReceiverServer, SimulatorSequencer, SwitchStub, TestReceiver, TriggerStub, ValueStub, XMLSequencer

public interface CancelRunnable
extends Runnable

An interface for use of threads that can be canceled. Implementations of this interface should gurantee that a call to the cancel() method ceases the thread execution. It is not necessarry, though, that thread execution stops immediately with a call to this method it is merely expected that this thread stops execution within maxTimeToCancel(). The thread the implemented object is running in can be retrieved with getAsociatedThread(). This method will return null if no thread has been started with this object.


Method Summary
 void cancel()
          A call to this method stops the thread execution.
 Thread getAsociatedThread()
          Returns the thread the implementing object is running in.
 long maxTimeToCancel()
          Returns the maximum time it will take this runnable object to exits its thread.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

cancel

void cancel()
A call to this method stops the thread execution.


maxTimeToCancel

long maxTimeToCancel()
Returns the maximum time it will take this runnable object to exits its thread. Used for determing time-out on shut-down.


getAsociatedThread

Thread getAsociatedThread()
Returns the thread the implementing object is running in. This method will return null if no thread has been started with this object.