Package io.netty.channel
Class AbstractChannel.CloseFuture
- java.lang.Object
-
- io.netty.util.concurrent.AbstractFuture<V>
-
- io.netty.util.concurrent.DefaultPromise<java.lang.Void>
-
- io.netty.channel.DefaultChannelPromise
-
- io.netty.channel.AbstractChannel.CloseFuture
-
- All Implemented Interfaces:
ChannelFlushPromiseNotifier.FlushCheckpoint
,ChannelFuture
,ChannelPromise
,Future<java.lang.Void>
,Promise<java.lang.Void>
,java.util.concurrent.Future<java.lang.Void>
- Enclosing class:
- AbstractChannel
static final class AbstractChannel.CloseFuture extends DefaultChannelPromise
-
-
Constructor Summary
Constructors Constructor Description CloseFuture(AbstractChannel ch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
setClosed()
ChannelPromise
setFailure(java.lang.Throwable cause)
Marks this future as a failure and notifies all listeners.ChannelPromise
setSuccess()
boolean
tryFailure(java.lang.Throwable cause)
Marks this future as a failure and notifies all listeners.boolean
trySuccess()
-
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 io.netty.util.concurrent.Promise
setUncancellable, trySuccess
-
-
-
-
Constructor Detail
-
CloseFuture
CloseFuture(AbstractChannel ch)
-
-
Method Detail
-
setSuccess
public ChannelPromise setSuccess()
- Specified by:
setSuccess
in interfaceChannelPromise
- Overrides:
setSuccess
in classDefaultChannelPromise
-
setFailure
public ChannelPromise setFailure(java.lang.Throwable cause)
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<java.lang.Void>
- Overrides:
setFailure
in classDefaultChannelPromise
-
trySuccess
public boolean trySuccess()
- Specified by:
trySuccess
in interfaceChannelPromise
- Overrides:
trySuccess
in classDefaultChannelPromise
-
tryFailure
public boolean tryFailure(java.lang.Throwable cause)
Description copied from interface:Promise
Marks this future as a failure and notifies all listeners.- Specified by:
tryFailure
in interfacePromise<java.lang.Void>
- Overrides:
tryFailure
in classDefaultPromise<java.lang.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()
-
-