org.teiid.client.util
Class ResultsFuture<T>
java.lang.Object
org.teiid.client.util.ResultsFuture<T>
- All Implemented Interfaces:
- Future<T>
public class ResultsFuture<T>
- extends Object
- implements Future<T>
Implements a call back based future that can also have
completion listeners.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL_FUTURE
public static ResultsFuture<Void> NULL_FUTURE
ResultsFuture
public ResultsFuture()
getResultsReceiver
public ResultsReceiver<T> getResultsReceiver()
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
in interface Future<T>
get
public T get()
throws InterruptedException,
ExecutionException
- Specified by:
get
in interface Future<T>
- Throws:
InterruptedException
ExecutionException
convertResult
protected T convertResult()
throws ExecutionException
- Throws:
ExecutionException
get
public T get(long timeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
- Specified by:
get
in interface Future<T>
- Throws:
InterruptedException
ExecutionException
TimeoutException
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interface Future<T>
isDone
public boolean isDone()
- Specified by:
isDone
in interface Future<T>
addCompletionListener
public void addCompletionListener(ResultsFuture.CompletionListener<T> listener)
Copyright © 2012. All Rights Reserved.