CallableV


Callable<V> java.util.concurrent

Java 5.0

This interface is a generalized form of the java.lang.Runnable interface. Unlike the run( ) method of Runnable , the call( ) method of Callable can return a value and throw an Exception . Callable is a generic type, and the type variable V represents the return type of the call( ) method.

An ExecutorService accepts Callable objects for asynchronous execution and returns a Future object representing the future result of the call( ) method.

 public interface  Callable<V>  {  // Public Instance Methods  V  call  ( ) throws Exception;   } 

Passed To

AbstractExecutorService.submit( ) , CompletionService.submit( ) , ExecutorCompletionService.submit( ) , Executors.{privilegedCallable( ) , privilegedCallableUsingCurrentClassLoader( )} , ExecutorService.submit( ) , FutureTask.FutureTask( ) , ScheduledExecutorService.schedule( ) , ScheduledThreadPoolExecutor.{schedule( ) , submit( )}

Returned By

Executors.{callable( ) , privilegedCallable( ) , privilegedCallableUsingCurrentClassLoader( )}



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net