com.ning.http.client.providers.jdk
Class JDKDelegateFuture<V>
java.lang.Object
com.ning.http.client.listenable.AbstractListenableFuture<V>
com.ning.http.client.providers.jdk.JDKFuture<V>
com.ning.http.client.providers.jdk.JDKDelegateFuture<V>
- All Implemented Interfaces:
- ListenableFuture<V>, Future<V>
public class JDKDelegateFuture<V>
- extends JDKFuture<V>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDKDelegateFuture
public JDKDelegateFuture(AsyncHandler<V> asyncHandler,
int responseTimeoutInMs,
ListenableFuture<V> delegateFuture,
HttpURLConnection urlConnection)
done
public void done(Callable callable)
- Description copied from interface:
ListenableFuture
- Execute a
Callable
and if there is no exception, mark this Future as done and release the internal lock.
- Specified by:
done
in interface ListenableFuture<V>
- Overrides:
done
in class JDKFuture<V>
abort
public void abort(Throwable t)
- Description copied from interface:
ListenableFuture
- Abort the current processing, and propagate the
Throwable
to the AsyncHandler
or Future
- Specified by:
abort
in interface ListenableFuture<V>
- Overrides:
abort
in class JDKFuture<V>
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
in interface Future<V>
- Overrides:
cancel
in class JDKFuture<V>
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interface Future<V>
- Overrides:
isCancelled
in class JDKFuture<V>
get
public V get(long timeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
- Specified by:
get
in interface Future<V>
- Overrides:
get
in class JDKFuture<V>
- Throws:
InterruptedException
ExecutionException
TimeoutException
Copyright © 2011. All Rights Reserved.