final class FailedChannelFuture extends CompleteChannelFuture
CompleteChannelFuture
which is failed already. It is
recommended to use Channel.newFailedFuture(Throwable)
instead of calling the constructor of this future.Modifier and Type | Field and Description |
---|---|
private java.lang.Throwable |
cause |
Constructor and Description |
---|
FailedChannelFuture(Channel channel,
EventExecutor executor,
java.lang.Throwable cause)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
cause()
Returns the cause of the failed I/O operation if the I/O operation has
failed.
|
boolean |
isSuccess()
Returns
true if and only if the I/O operation was completed
successfully. |
ChannelFuture |
sync()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
ChannelFuture |
syncUninterruptibly()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
addListener, addListeners, await, awaitUninterruptibly, channel, executor, getNow, removeListener, removeListeners
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, isCancellable, isCancelled, isDone
get, get
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, isCancellable
FailedChannelFuture(Channel channel, EventExecutor executor, java.lang.Throwable cause)
channel
- the Channel
associated with this futurecause
- the cause of failurepublic java.lang.Throwable cause()
Future
null
if succeeded or this future is not
completed yet.public boolean isSuccess()
Future
true
if and only if the I/O operation was completed
successfully.public ChannelFuture sync()
Future
sync
in interface ChannelFuture
sync
in class CompleteChannelFuture
public ChannelFuture syncUninterruptibly()
Future
syncUninterruptibly
in interface ChannelFuture
syncUninterruptibly
in class CompleteChannelFuture