Class JDKHttpFuture<V>
java.lang.Object
com.github.scribejava.core.httpclient.jdk.JDKHttpFuture<V>
- Type Parameters:
V-
- All Implemented Interfaces:
Future<V>
Fake Future. Just to have Future API for the default JDK Http client. It's NOT Async in any way. Just facade.
That's it. Sync execution with Async methods. This class does NOT provide any async executions.
That's it. Sync execution with Async methods. This class does NOT provide any async executions.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
JDKHttpFuture
-
JDKHttpFuture
-
-
Method Details
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceFuture<V>
-
isDone
public boolean isDone() -
get
- Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionException
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture<V>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-