KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > EDU > oswego > cs > dl > util > concurrent > Callable


1
2 /*
3   File: Callable.java
4
5   Originally written by Doug Lea and released into the public domain.
6   This may be used for any purposes whatsoever without acknowledgment.
7   Thanks for the assistance and support of Sun Microsystems Labs,
8   and everyone contributing, testing, and using this code.
9
10   History:
11   Date Who What
12   30Jun1998 dl Create public version
13    5Jan1999 dl Change Exception to Throwable in call signature
14   27Jan1999 dl Undo last change
15 */

16
17 package EDU.oswego.cs.dl.util.concurrent;
18
19 /**
20  * Interface for runnable actions that bear results and/or throw Exceptions.
21  * This interface is designed to provide a common protocol for
22  * result-bearing actions that can be run independently in threads,
23  * in which case
24  * they are ordinarily used as the bases of Runnables that set
25  * FutureResults
26  * <p>
27  * <p>[<a HREF="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html"> Introduction to this package. </a>]
28  * @see FutureResult
29  **/

30
31 public interface Callable {
32   /** Perform some action that returns a result or throws an exception **/
33   Object JavaDoc call() throws Exception JavaDoc;
34 }
35
36
Popular Tags