7 |
|
package java.util.concurrent; |
8 |
|
|
9 |
|
/** |
10 |
< |
* An inteface for describing an asynchronous task that returns a result and may throw an exception. |
11 |
< |
* Implementors define a single method with no arguments called <tt>call</tt>. |
10 |
> |
* A task that returns a result and may throw an exception. |
11 |
> |
* Implementors define a single method with no arguments called |
12 |
> |
* <tt>call</tt>. |
13 |
|
* |
14 |
< |
* <p>The <tt>Callable</tt> interface is similar to {@link Runnable}, in that |
15 |
< |
* both are designed for classes whose instances are potentially executed by another thread. |
16 |
< |
* A <tt>Runnable</tt>, however, does not return a result and cannot throw a |
17 |
< |
* checked exception. |
18 |
< |
* |
18 |
< |
* @fixme Should "asynchronous task" be defined somewhere? |
14 |
> |
* <p>The <tt>Callable</tt> interface is similar to {@link Runnable}, |
15 |
> |
* in that both are designed for classes whose instances are |
16 |
> |
* potentially executed by another thread. A <tt>Runnable</tt>, |
17 |
> |
* however, does not return a result and cannot throw a checked |
18 |
> |
* exception. |
19 |
|
* |
20 |
+ |
|
21 |
|
* @since 1.5 |
22 |
|
* @see Executor |
23 |
|
* @see FutureTask |
25 |
|
* @spec JSR-166 |
26 |
|
* @revised $Date$ |
27 |
|
* @editor $Author$ |
28 |
+ |
* @author Doug Lea |
29 |
|
*/ |
30 |
|
public interface Callable<V> { |
31 |
|
/** |