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 final class FutureCompletionHandler<V,A>
extends Object
implements CompletionHandler<V,A>, Future<V>, Runnable
- Since:
- Java 17+
- Author:
- Kimi Liu
-
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
-
FutureCompletionHandler
-
FutureCompletionHandler
public FutureCompletionHandler()
-
-
Method Details
-
completed
-
failed
-
cancel
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceFuture<V>
-
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
-