Class JDKHttpFuture<V>
- java.lang.Object
-
- com.github.scribejava.core.httpclient.jdk.JDKHttpFuture<V>
-
- All Implemented Interfaces:
Future<V>
public class JDKHttpFuture<V> extends Object implements 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.
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceFuture<V>
-
get
public V get() throws InterruptedException, ExecutionException
- 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
-
-