/Users/lyon/j4p/src/classUtils/pack/util/Terminable.java
|
1 package classUtils.pack.util;
2
3 /**
4 * This interface extends the standard Runnable by providing
5 * methods to gracefully shut down a Thread.
6 *
7 * @author C. Sadun
8 * @version 1.0
9 */
10 public interface Terminable extends Runnable {
11
12 /**
13 * Unconditionally requests a shutdown. The runnable will complete
14 * its last atomic operation, and gracefully exit the run() method.
15 */
16 public void shutdown();
17
18 /**
19 * Return <b>true</b> if a shutdown has been requested.
20 * @return <b>true</b> if a shutdown has been requested
21 */
22 public boolean isShuttingDown();
23
24 }