The Callable interface is similar to {@link java.lang.Runnable}, in that both are designed for classes whose instances are potentially executed by another thread. A Runnable, however, does not return a result and cannot throw a checked exception.
The {@link Executors} class contains utility methods toconvert from other common forms to Callable classes. @see Executor @since 1.5 @author Doug Lea
Callable
is used to provide a Service with an interface that supports event calls. Components do not have to implement this interface, though the onCall
method provides an example lifecycle method that is executed when an event is received for the implementing service.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|