KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > logicalcobwebs > concurrent > Callable


1 /*
2   File: Callable.java
3
4   Originally written by Doug Lea and released into the public domain.
5   This may be used for any purposes whatsoever without acknowledgment.
6   Thanks for the assistance and support of Sun Microsystems Labs,
7   and everyone contributing, testing, and using this code.
8
9   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 org.logicalcobwebs.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 JavaDoc call() throws Exception JavaDoc;
33 }
34
35
Popular Tags