Top Description Fields Methods
io.netty.channel

public Interface ChannelFutureListener

extends GenericFutureListener<ChannelFuture>
Known Direct Implementers
io.netty.channel.DelegatingChannelPromiseNotifier, io.netty.channel.ChannelPromiseAggregator, io.netty.channel.ChannelPromiseNotifier
Imports
io.netty.util.concurrent.Future, .GenericFutureListener

Listens to the result of a ChannelFuture. The result of the asynchronous Channel I/O operation is notified once this listener is added by calling ChannelFuture#addListener(GenericFutureListener).

Return the control to the caller quickly

operationComplete(Future) is directly called by an I/O thread. Therefore, performing a time consuming task or a blocking operation in the handler method can cause an unexpected pause during I/O. If you need to perform a blocking operation on I/O completion, try to execute the operation in a different thread using a thread pool.

Field Summary

Modifier and TypeField and Description
public static final ChannelFutureListener
CLOSE

A ChannelFutureListener that closes the Channel which is associated with the specified ChannelFuture.

public static final ChannelFutureListener
CLOSE_ON_FAILURE

A ChannelFutureListener that closes the Channel when the operation ended up with a failure or cancellation rather than a success.

public static final ChannelFutureListener

Method Summary

Inherited from io.netty.util.concurrent.GenericFutureListener:
operationComplete

Field Detail

CLOSEback to summary
public static final ChannelFutureListener CLOSE

A ChannelFutureListener that closes the Channel which is associated with the specified ChannelFuture.

CLOSE_ON_FAILUREback to summary
public static final ChannelFutureListener CLOSE_ON_FAILURE

A ChannelFutureListener that closes the Channel when the operation ended up with a failure or cancellation rather than a success.

FIRE_EXCEPTION_ON_FAILUREback to summary
public static final ChannelFutureListener FIRE_EXCEPTION_ON_FAILURE

A ChannelFutureListener that forwards the Throwable of the ChannelFuture into the ChannelPipeline. This mimics the old behavior of Netty 3.