public class JDKDelegateFuture<V> extends JDKFuture<V>
asyncHandler, cancelled, contentProcessed, exception, innerFuture, isDone, responseTimeoutInMs, timedOut, touch, urlConnection
Constructor and Description |
---|
JDKDelegateFuture(AsyncHandler<V> asyncHandler,
int responseTimeoutInMs,
ListenableFuture<V> delegateFuture,
HttpURLConnection urlConnection) |
Modifier and Type | Method and Description |
---|---|
void |
abort(Throwable t)
|
boolean |
cancel(boolean mayInterruptIfRunning) |
void |
done(Callable callable)
Execute a
Callable 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, getAndSetWriteBody, getAndSetWriteHeaders, hasExpired, isDone, setInnerFuture, touch
addListener, done
public JDKDelegateFuture(AsyncHandler<V> asyncHandler, int responseTimeoutInMs, ListenableFuture<V> delegateFuture, HttpURLConnection urlConnection)
public void done(Callable callable)
ListenableFuture
Callable
and if there is no exception, mark this Future as done and release the internal lock.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 © 2015. All rights reserved.