com.sun.xml.ws.util
Class CompletedFuture<T>

java.lang.Object
  extended by com.sun.xml.ws.util.CompletedFuture<T>
All Implemented Interfaces:
Future<T>

public class CompletedFuture<T>
extends Object
implements Future<T>

Future implementation that obtains an already available value.


Constructor Summary
CompletedFuture(T v, Throwable re)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 T get()
           
 T get(long timeout, TimeUnit unit)
           
 boolean isCancelled()
           
 boolean isDone()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompletedFuture

public CompletedFuture(T v,
                       Throwable re)
Method Detail

cancel

public boolean cancel(boolean mayInterruptIfRunning)
Specified by:
cancel in interface Future<T>

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Future<T>

isDone

public boolean isDone()
Specified by:
isDone in interface Future<T>

get

public T get()
      throws ExecutionException
Specified by:
get in interface Future<T>
Throws:
ExecutionException

get

public T get(long timeout,
             TimeUnit unit)
      throws ExecutionException
Specified by:
get in interface Future<T>
Throws:
ExecutionException