Class FailedChannelFuture

All Implemented Interfaces:
ChannelFuture, Future<Void>, Future<Void>

final class FailedChannelFuture extends CompleteChannelFuture
The CompleteChannelFuture which is failed already. It is recommended to use ChannelOutboundInvoker.newFailedFuture(Throwable) instead of calling the constructor of this future.
  • Field Details

  • Constructor Details

    • FailedChannelFuture

      FailedChannelFuture(Channel channel, EventExecutor executor, Throwable cause)
      Creates a new instance.
      Parameters:
      channel - the Channel associated with this future
      cause - the cause of failure
  • Method Details

    • cause

      public Throwable cause()
      Description copied from interface: Future
      Returns the cause of the failed I/O operation if the I/O operation has failed.
      Returns:
      the cause of the failure. null if succeeded or this future is not completed yet.
    • isSuccess

      public boolean isSuccess()
      Description copied from interface: Future
      Returns true if and only if the I/O operation was completed successfully.
    • sync

      public ChannelFuture sync()
      Description copied from interface: Future
      Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
      Specified by:
      sync in interface ChannelFuture
      Specified by:
      sync in interface Future<Void>
      Overrides:
      sync in class CompleteChannelFuture
    • syncUninterruptibly

      public ChannelFuture syncUninterruptibly()
      Description copied from interface: Future
      Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
      Specified by:
      syncUninterruptibly in interface ChannelFuture
      Specified by:
      syncUninterruptibly in interface Future<Void>
      Overrides:
      syncUninterruptibly in class CompleteChannelFuture