Top Description Fields Constructors Methods
io.netty.channel

pack-priv abstract Class CompleteChannelFuture

extends CompleteFuture<Void>
implements ChannelFuture
Class Inheritance
All Implemented Interfaces
io.netty.channel.ChannelFuture, io.netty.util.concurrent.Future, java.util.concurrent.Future
Known Direct Subclasses
io.netty.channel.SucceededChannelFuture, io.netty.channel.FailedChannelFuture
Imports
io.netty.util.concurrent.CompleteFuture, .EventExecutor, .Future, .GenericFutureListener, io.netty.util.internal.ObjectUtil

A skeletal ChannelFuture implementation which represents a ChannelFuture which has been completed already.

Field Summary

Modifier and TypeField and Description
private final Channel

Constructor Summary

AccessConstructor and Description
protected
CompleteChannelFuture(Channel
the Channel associated with this future
channel
,
EventExecutor executor)

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public ChannelFuture
public ChannelFuture
public ChannelFuture
public ChannelFuture
public Channel
channel()

Implements io.netty.channel.ChannelFuture.channel.

Returns a channel where the I/O operation associated with this future takes place.
protected EventExecutor
public Void
getNow()

Implements io.netty.util.concurrent.Future.getNow.

Return the result without blocking.
public boolean
public ChannelFuture
removeListener(GenericFutureListener<? extends Future<? super Void>> listener)

Overrides io.netty.util.concurrent.CompleteFuture.removeListener.

Implements io.netty.channel.ChannelFuture.removeListener, io.netty.util.concurrent.Future.removeListener.

Removes the first occurrence of the specified listener from this future.
public ChannelFuture
removeListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)

Overrides io.netty.util.concurrent.CompleteFuture.removeListeners.

Implements io.netty.channel.ChannelFuture.removeListeners, io.netty.util.concurrent.Future.removeListeners.

Removes the first occurrence for each of the listeners from this future.
public ChannelFuture
sync()

Overrides io.netty.util.concurrent.CompleteFuture.sync.

Implements io.netty.channel.ChannelFuture.sync, io.netty.util.concurrent.Future.sync.

Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
public ChannelFuture
syncUninterruptibly()

Overrides io.netty.util.concurrent.CompleteFuture.syncUninterruptibly.

Implements io.netty.channel.ChannelFuture.syncUninterruptibly, io.netty.util.concurrent.Future.syncUninterruptibly.

Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
Inherited from io.netty.util.concurrent.CompleteFuture:
awaitawaitawaitUninterruptiblyawaitUninterruptiblycancelisCancellableisCancelledisDone

Field Detail

channelback to summary
private final Channel channel

Constructor Detail

CompleteChannelFutureback to summary
protected CompleteChannelFuture(Channel channel, EventExecutor executor)

Creates a new instance.

Parameters
channel:Channel

the Channel associated with this future

Method Detail

addListenerback to summary
public ChannelFuture addListener(GenericFutureListener<? extends Future<? super Void>> listener)

Overrides io.netty.util.concurrent.CompleteFuture.addListener.

Implements io.netty.channel.ChannelFuture.addListener, io.netty.util.concurrent.Future.addListener.

Doc from io.netty.util.concurrent.Future.addListener.

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.

Annotations
@Override
addListenersback to summary
public ChannelFuture addListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)

Overrides io.netty.util.concurrent.CompleteFuture.addListeners.

Implements io.netty.channel.ChannelFuture.addListeners, io.netty.util.concurrent.Future.addListeners.

Doc from io.netty.util.concurrent.Future.addListeners.

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.

Annotations
@Override
awaitback to summary
public ChannelFuture await() throws InterruptedException

Overrides io.netty.util.concurrent.CompleteFuture.await.

Implements io.netty.channel.ChannelFuture.await, io.netty.util.concurrent.Future.await.

Doc from io.netty.util.concurrent.Future.await.

Waits for this future to be completed.

Annotations
@Override
Exceptions
InterruptedException:
if the current thread was interrupted
awaitUninterruptiblyback to summary
public ChannelFuture awaitUninterruptibly()

Overrides io.netty.util.concurrent.CompleteFuture.awaitUninterruptibly.

Implements io.netty.channel.ChannelFuture.awaitUninterruptibly, io.netty.util.concurrent.Future.awaitUninterruptibly.

Doc from io.netty.util.concurrent.Future.awaitUninterruptibly.

Waits for this future to be completed without interruption. This method catches an InterruptedException and discards it silently.

Annotations
@Override
channelback to summary
public Channel channel()

Implements io.netty.channel.ChannelFuture.channel.

Doc from io.netty.channel.ChannelFuture.channel.

Returns a channel where the I/O operation associated with this future takes place.

Annotations
@Override
executorback to summary
protected EventExecutor executor()

Overrides io.netty.util.concurrent.CompleteFuture.executor.

Doc from io.netty.util.concurrent.CompleteFuture.executor.

Return the EventExecutor which is used by this CompleteFuture.

Annotations
@Override
getNowback to summary
public Void getNow()

Implements io.netty.util.concurrent.Future.getNow.

Doc from io.netty.util.concurrent.Future.getNow.

Return the result without blocking. If the future is not done yet this will return null. As it is possible that a null value is used to mark the future as successful you also need to check if the future is really done with isDone() and not rely on the returned null value.

Annotations
@Override
isVoidback to summary
public boolean isVoid()

Implements io.netty.channel.ChannelFuture.isVoid.

Doc from io.netty.channel.ChannelFuture.isVoid.

Returns true if this ChannelFuture is a void future and so not allow to call any of the following methods:

Annotations
@Override
removeListenerback to summary
public ChannelFuture removeListener(GenericFutureListener<? extends Future<? super Void>> listener)

Overrides io.netty.util.concurrent.CompleteFuture.removeListener.

Implements io.netty.channel.ChannelFuture.removeListener, io.netty.util.concurrent.Future.removeListener.

Doc from io.netty.util.concurrent.Future.removeListener.

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.

Annotations
@Override
removeListenersback to summary
public ChannelFuture removeListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)

Overrides io.netty.util.concurrent.CompleteFuture.removeListeners.

Implements io.netty.channel.ChannelFuture.removeListeners, io.netty.util.concurrent.Future.removeListeners.

Doc from io.netty.util.concurrent.Future.removeListeners.

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.

Annotations
@Override
syncback to summary
public ChannelFuture sync() throws InterruptedException

Overrides io.netty.util.concurrent.CompleteFuture.sync.

Implements io.netty.channel.ChannelFuture.sync, io.netty.util.concurrent.Future.sync.

Doc from io.netty.util.concurrent.Future.sync.

Waits for this future until it is done, and rethrows the cause of the failure if this future failed.

Annotations
@Override
syncUninterruptiblyback to summary
public ChannelFuture syncUninterruptibly()

Overrides io.netty.util.concurrent.CompleteFuture.syncUninterruptibly.

Implements io.netty.channel.ChannelFuture.syncUninterruptibly, io.netty.util.concurrent.Future.syncUninterruptibly.

Doc from io.netty.util.concurrent.Future.syncUninterruptibly.

Waits for this future until it is done, and rethrows the cause of the failure if this future failed.

Annotations
@Override