Package io.netty.channel
Class AbstractChannel.CloseFuture
java.lang.Object
io.netty.util.concurrent.AbstractFuture<Void>
io.netty.util.concurrent.DefaultPromise<Void>
io.netty.channel.DefaultChannelPromise
io.netty.channel.AbstractChannel.CloseFuture
- All Implemented Interfaces:
ChannelFlushPromiseNotifier.FlushCheckpoint,ChannelFuture,ChannelPromise,Future<Void>,Promise<Void>,Future<Void>
- Enclosing class:
AbstractChannel
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Field Summary
Fields inherited from class io.netty.util.concurrent.DefaultPromise
PROPERTY_MAX_LISTENER_STACK_DEPTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleansetFailure(Throwable cause) Marks this future as a failure and notifies all listeners.booleantryFailure(Throwable cause) Marks this future as a failure and notifies all listeners.booleanMethods inherited from class io.netty.channel.DefaultChannelPromise
addListener, addListeners, await, awaitUninterruptibly, channel, checkDeadLock, executor, flushCheckpoint, flushCheckpoint, isVoid, promise, removeListener, removeListeners, setSuccess, sync, syncUninterruptibly, unvoidMethods inherited from class io.netty.util.concurrent.DefaultPromise
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, get, get, getNow, isCancellable, isCancelled, isDone, isSuccess, notifyListener, setUncancellable, toString, toStringBuilder, trySuccessMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.netty.util.concurrent.Future
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccessMethods inherited from interface java.util.concurrent.Future
exceptionNow, get, get, isCancelled, isDone, resultNow, stateMethods inherited from interface io.netty.util.concurrent.Promise
setUncancellable, trySuccess
-
Constructor Details
-
CloseFuture
CloseFuture(AbstractChannel ch)
-
-
Method Details
-
setSuccess
- Specified by:
setSuccessin interfaceChannelPromise- Overrides:
setSuccessin classDefaultChannelPromise
-
setFailure
Description copied from interface:PromiseMarks this future as a failure and notifies all listeners. If it is success or failed already it will throw anIllegalStateException.- Specified by:
setFailurein interfaceChannelPromise- Specified by:
setFailurein interfacePromise<Void>- Overrides:
setFailurein classDefaultChannelPromise
-
trySuccess
public boolean trySuccess()- Specified by:
trySuccessin interfaceChannelPromise- Overrides:
trySuccessin classDefaultChannelPromise
-
tryFailure
Description copied from interface:PromiseMarks this future as a failure and notifies all listeners.- Specified by:
tryFailurein interfacePromise<Void>- Overrides:
tryFailurein classDefaultPromise<Void>- Returns:
trueif and only if successfully marked this future as a failure. Otherwisefalsebecause this future is already marked as either a success or a failure.
-
setClosed
boolean setClosed()
-