public class JDKDelegateFuture<V> extends JDKFuture<V>
ListenableFuture.CompletedFailure<T>
asyncHandler, cancelled, contentProcessed, exception, innerFuture, isDone, responseTimeoutInMs, timedOut, touch, urlConnection
Constructor and Description |
---|
JDKDelegateFuture(AsyncHandler<V> asyncHandler,
int responseTimeoutInMs,
JDKFuture<V> delegateFuture,
HttpURLConnection urlConnection) |
Modifier and Type | Method and Description |
---|---|
void |
abort(Throwable t)
|
boolean |
cancel(boolean mayInterruptIfRunning) |
void |
done()
Terminate and if there is no exception, mark this Future as done and release the internal lock.
|
V |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
content, get, hasExpired, isDone, setInnerFuture, touch
addListener, runListeners
public JDKDelegateFuture(AsyncHandler<V> asyncHandler, int responseTimeoutInMs, JDKFuture<V> delegateFuture, HttpURLConnection urlConnection)
public void done()
ListenableFuture
public void abort(Throwable t)
ListenableFuture
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<V>
isCancelled
in class JDKFuture<V>
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<V>
get
in class JDKFuture<V>
InterruptedException
ExecutionException
TimeoutException
Copyright © 2014. All Rights Reserved.