01: /*
02: File: Callable.java
03:
04: Originally written by Doug Lea and released into the public domain.
05: This may be used for any purposes whatsoever without acknowledgment.
06: Thanks for the assistance and support of Sun Microsystems Labs,
07: and everyone contributing, testing, and using this code.
08:
09: History:
10: Date Who What
11: 30Jun1998 dl Create public version
12: 5Jan1999 dl Change Exception to Throwable in call signature
13: 27Jan1999 dl Undo last change
14: */
15:
16: package EDU.oswego.cs.dl.util.concurrent;
17:
18: /**
19: * Interface for runnable actions that bear results and/or throw Exceptions.
20: * This interface is designed to provide a common protocol for
21: * result-bearing actions that can be run independently in threads,
22: * in which case
23: * they are ordinarily used as the bases of Runnables that set
24: * FutureResults
25: * <p>
26: * <p>[<a href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html"> Introduction to this package. </a>]
27: * @see FutureResult
28: **/
29:
30: public interface Callable {
31: /** Perform some action that returns a result or throws an exception **/
32: Object call() throws Exception;
33: }
|