Package org.aoju.bus.socket.handler
Class FutureCompletionHandler<V,A>
java.lang.Object
org.aoju.bus.socket.handler.FutureCompletionHandler<V,A>
- Type Parameters:
V- 泛型对象A- 泛型对象
- All Implemented Interfaces:
Runnable,CompletionHandler<V,,A> Future<V>
public class FutureCompletionHandler<V,A>
extends Object
implements CompletionHandler<V,A>, Future<V>, Runnable
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FutureCompletionHandler
-
FutureCompletionHandler
public FutureCompletionHandler()
-
-
Method Details
-
completed
- Specified by:
completedin interfaceCompletionHandler<V,A>
-
failed
- Specified by:
failedin interfaceCompletionHandler<V,A>
-
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
-
run
public void run()
-