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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
setFailure
(Throwable cause) Marks this future as a failure and notifies all listeners.boolean
tryFailure
(Throwable cause) Marks this future as a failure and notifies all listeners.boolean
Methods inherited from class io.netty.channel.DefaultChannelPromise
addListener, addListeners, await, awaitUninterruptibly, channel, checkDeadLock, executor, flushCheckpoint, flushCheckpoint, isVoid, promise, removeListener, removeListeners, setSuccess, sync, syncUninterruptibly, unvoid
Methods 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, trySuccess
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.netty.util.concurrent.Future
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccess
Methods inherited from interface java.util.concurrent.Future
exceptionNow, get, get, isCancelled, isDone, resultNow, state
Methods inherited from interface io.netty.util.concurrent.Promise
setUncancellable, trySuccess
-
Constructor Details
-
CloseFuture
CloseFuture(AbstractChannel ch)
-
-
Method Details
-
setSuccess
- Specified by:
setSuccess
in interfaceChannelPromise
- Overrides:
setSuccess
in classDefaultChannelPromise
-
setFailure
Description copied from interface:Promise
Marks this future as a failure and notifies all listeners. If it is success or failed already it will throw anIllegalStateException
.- Specified by:
setFailure
in interfaceChannelPromise
- Specified by:
setFailure
in interfacePromise<Void>
- Overrides:
setFailure
in classDefaultChannelPromise
-
trySuccess
public boolean trySuccess()- Specified by:
trySuccess
in interfaceChannelPromise
- Overrides:
trySuccess
in classDefaultChannelPromise
-
tryFailure
Description copied from interface:Promise
Marks this future as a failure and notifies all listeners.- Specified by:
tryFailure
in interfacePromise<Void>
- Overrides:
tryFailure
in classDefaultPromise<Void>
- Returns:
true
if and only if successfully marked this future as a failure. Otherwisefalse
because this future is already marked as either a success or a failure.
-
setClosed
boolean setClosed()
-