public interface ChannelFutureListener extends GenericFutureListener<ChannelFuture>
ChannelFuture
. The result of the
asynchronous Channel
I/O operation is notified once this listener
is added by calling ChannelFuture.addListener(GenericFutureListener)
.
GenericFutureListener.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.Modifier and Type | Field and Description |
---|---|
static ChannelFutureListener |
CLOSE
A
ChannelFutureListener that closes the Channel which is
associated with the specified ChannelFuture . |
static ChannelFutureListener |
CLOSE_ON_FAILURE
A
ChannelFutureListener that closes the Channel when the
operation ended up with a failure or cancellation rather than a success. |
static ChannelFutureListener |
FIRE_EXCEPTION_ON_FAILURE
|
operationComplete
static final ChannelFutureListener CLOSE
ChannelFutureListener
that closes the Channel
which is
associated with the specified ChannelFuture
.static final ChannelFutureListener CLOSE_ON_FAILURE
ChannelFutureListener
that closes the Channel
when the
operation ended up with a failure or cancellation rather than a success.static final ChannelFutureListener FIRE_EXCEPTION_ON_FAILURE
ChannelFutureListener
that forwards the Throwable
of the ChannelFuture
into the
ChannelPipeline
. This mimics the old behavior of Netty 3.Copyright © 2008–2024 The Netty Project. All rights reserved.