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.
-
-
Constructor Summary
Constructors Constructor Description JDKHttpFuture(Exception exception)
JDKHttpFuture(V response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
V
get()
V
get(long timeout, TimeUnit unit)
boolean
isCancelled()
boolean
isDone()
-
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<V>
-
get
public V get() throws InterruptedException, ExecutionException
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
-