GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Overview
  • Use
  • Tree
  • Deprecated
  • Index
  • Search
  • Help
  • io.netty.channel
  • ChannelPromise

This view

  • Original page
  • New address

GeezerVison is showing netty.io — ChannelPromise (Netty API Reference (4.1.141.Final))

Interface ChannelPromise

All Superinterfaces:
ChannelFuture, Future<Void>, Future<Void>, Promise<Void>
All Known Subinterfaces:
ChannelProgressivePromise
All Known Implementing Classes:
DefaultChannelProgressivePromise, DefaultChannelPromise, DelegatingChannelPromiseNotifier, VoidChannelPromise

public interface ChannelPromise extends ChannelFuture, Promise<Void>
Special ChannelFuture which is writable.
  • Method Summary

    Modifier and Type
    Method
    Description
    ChannelPromise
    addListener(GenericFutureListener<? extends Future<? super Void>> listener)
    Adds the specified listener to this future.
    ChannelPromise
    addListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)
    Adds the specified listeners to this future.
    ChannelPromise
    await()
    Waits for this future to be completed.
    ChannelPromise
    awaitUninterruptibly()
    Waits for this future to be completed without interruption.
    Channel
    channel()
    Returns a channel where the I/O operation associated with this future takes place.
    ChannelPromise
    removeListener(GenericFutureListener<? extends Future<? super Void>> listener)
    Removes the first occurrence of the specified listener from this future.
    ChannelPromise
    removeListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)
    Removes the first occurrence for each of the listeners from this future.
    ChannelPromise
    setFailure(Throwable cause)
    Marks this future as a failure and notifies all listeners.
    ChannelPromise
    setSuccess()
     
    ChannelPromise
    setSuccess(Void result)
    Marks this future as a success and notifies all listeners.
    ChannelPromise
    sync()
    Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
    ChannelPromise
    syncUninterruptibly()
    Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
    boolean
    trySuccess()
     
    ChannelPromise
    unvoid()
    Returns a new ChannelPromise if ChannelFuture.isVoid() returns true otherwise itself.

    Methods inherited from interface ChannelFuture

    isVoid
    Modifier and Type
    Method
    Description
    boolean
    isVoid()
    Returns true if this ChannelFuture is a void future and so not allow to call any of the following methods: ChannelFuture.addListener(GenericFutureListener) ChannelFuture.addListeners(GenericFutureListener[]) ChannelFuture.await() Future.await(long, TimeUnit) ()} Future.await(long) ()} ChannelFuture.awaitUninterruptibly() ChannelFuture.sync() ChannelFuture.syncUninterruptibly()

    Methods inherited from interface Future

    await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccess
    Modifier and Type
    Method
    Description
    boolean
    await(long timeoutMillis)
    Waits for this future to be completed within the specified time limit.
    boolean
    await(long timeout, TimeUnit unit)
    Waits for this future to be completed within the specified time limit.
    boolean
    awaitUninterruptibly(long timeoutMillis)
    Waits for this future to be completed within the specified time limit without interruption.
    boolean
    awaitUninterruptibly(long timeout, TimeUnit unit)
    Waits for this future to be completed within the specified time limit without interruption.
    boolean
    cancel(boolean mayInterruptIfRunning)
    If the cancellation was successful it will fail the future with a CancellationException.
    Throwable
    cause()
    Returns the cause of the failed I/O operation if the I/O operation has failed.
    Void
    getNow()
    Return the result without blocking.
    boolean
    isCancellable()
    returns true if and only if the operation can be cancelled via Future.cancel(boolean).
    boolean
    isSuccess()
    Returns true if and only if the I/O operation was completed successfully.

    Methods inherited from interface Future

    get, get, isCancelled, isDone

    Methods inherited from interface Promise

    setUncancellable, tryFailure, trySuccess
    Modifier and Type
    Method
    Description
    boolean
    setUncancellable()
    Make this future impossible to cancel.
    boolean
    tryFailure(Throwable cause)
    Marks this future as a failure and notifies all listeners.
    boolean
    trySuccess(Void result)
    Marks this future as a success and notifies all listeners.
  • Method Details

    • channel

      Channel channel()
      Description copied from interface: ChannelFuture
      Returns a channel where the I/O operation associated with this future takes place.
      Specified by:
      channel in interface ChannelFuture
    • setSuccess

      ChannelPromise setSuccess(Void result)
      Description copied from interface: Promise
      Marks this future as a success and notifies all listeners. If it is success or failed already it will throw an IllegalStateException.
      Specified by:
      setSuccess in interface Promise<Void>
    • setSuccess

      ChannelPromise setSuccess()
    • trySuccess

      boolean trySuccess()
    • setFailure

      ChannelPromise setFailure(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 an IllegalStateException.
      Specified by:
      setFailure in interface Promise<Void>
    • addListener

      ChannelPromise addListener(GenericFutureListener<? extends Future<? super Void>> listener)
      Description copied from interface: Future
      Adds the specified listener to this future. The specified listener is notified when this future is done. If this future is already completed, the specified listener is notified immediately.
      Specified by:
      addListener in interface ChannelFuture
      Specified by:
      addListener in interface Future<Void>
      Specified by:
      addListener in interface Promise<Void>
    • addListeners

      ChannelPromise addListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)
      Description copied from interface: Future
      Adds the specified listeners to this future. The specified listeners are notified when this future is done. If this future is already completed, the specified listeners are notified immediately.
      Specified by:
      addListeners in interface ChannelFuture
      Specified by:
      addListeners in interface Future<Void>
      Specified by:
      addListeners in interface Promise<Void>
    • removeListener

      ChannelPromise removeListener(GenericFutureListener<? extends Future<? super Void>> listener)
      Description copied from interface: Future
      Removes the first occurrence of the specified listener from this future. The specified listener is no longer notified when this future is done. If the specified listener is not associated with this future, this method does nothing and returns silently.
      Specified by:
      removeListener in interface ChannelFuture
      Specified by:
      removeListener in interface Future<Void>
      Specified by:
      removeListener in interface Promise<Void>
    • removeListeners

      ChannelPromise removeListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)
      Description copied from interface: Future
      Removes the first occurrence for each of the listeners from this future. The specified listeners are no longer notified when this future is done. If the specified listeners are not associated with this future, this method does nothing and returns silently.
      Specified by:
      removeListeners in interface ChannelFuture
      Specified by:
      removeListeners in interface Future<Void>
      Specified by:
      removeListeners in interface Promise<Void>
    • sync

      ChannelPromise sync() throws InterruptedException
      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>
      Specified by:
      sync in interface Promise<Void>
      Throws:
      InterruptedException
    • syncUninterruptibly

      ChannelPromise 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>
      Specified by:
      syncUninterruptibly in interface Promise<Void>
    • await

      ChannelPromise await() throws InterruptedException
      Description copied from interface: Future
      Waits for this future to be completed.
      Specified by:
      await in interface ChannelFuture
      Specified by:
      await in interface Future<Void>
      Specified by:
      await in interface Promise<Void>
      Throws:
      InterruptedException - if the current thread was interrupted
    • awaitUninterruptibly

      ChannelPromise awaitUninterruptibly()
      Description copied from interface: Future
      Waits for this future to be completed without interruption. This method catches an InterruptedException and discards it silently.
      Specified by:
      awaitUninterruptibly in interface ChannelFuture
      Specified by:
      awaitUninterruptibly in interface Future<Void>
      Specified by:
      awaitUninterruptibly in interface Promise<Void>
    • unvoid

      ChannelPromise unvoid()
      Returns a new ChannelPromise if ChannelFuture.isVoid() returns true otherwise itself.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.