Package org.apache.hc.client5.http.impl
Class Operations.CompletedFuture<T>
java.lang.Object
org.apache.hc.client5.http.impl.Operations.CompletedFuture<T>
- Type Parameters:
T
- operation result representation.
- All Implemented Interfaces:
Future<T>
- Enclosing class:
Operations
This class represents a
Future
in the completed state with a fixed result.
The outcome of the future cannot be altered and it cannot be cancelled.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
result
-
-
Constructor Details
-
CompletedFuture
-
-
Method Details
-
get
- Specified by:
get
in interfaceFuture<T>
- Throws:
InterruptedException
ExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
get
in interfaceFuture<T>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceFuture<T>
-
isDone
public boolean isDone()
-