org.sadun.util
Interface Terminable

All Superinterfaces:
java.lang.Runnable
All Known Implementing Classes:
BasePassivationManager, ThreadPoolThread, WatchDog

public interface Terminable
extends java.lang.Runnable

This interface extends the standard Runnable by providing methods to gracefully shut down a Thread.

Version:
1.0
Author:
C. Sadun

Method Summary
 boolean isShuttingDown()
          Return true if a shutdown has been requested.
 void shutdown()
          Unconditionally requests a shutdown.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

shutdown

public void shutdown()
Unconditionally requests a shutdown. The runnable will complete its last atomic operation, and gracefully exit the run() method.


isShuttingDown

public boolean isShuttingDown()
Return true if a shutdown has been requested.

Returns:
true if a shutdown has been requested