public interface ChannelFutureListener extends EventListener
ChannelFuture
. The result of the
asynchronous Channel
I/O operation is notified once this listener
is added by calling ChannelFuture.addListener(ChannelFutureListener)
.
operationComplete(ChannelFuture)
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. |
Modifier and Type | Method and Description |
---|---|
void |
operationComplete(ChannelFuture future)
Invoked when the I/O operation associated with the
ChannelFuture
has been completed. |
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.void operationComplete(ChannelFuture future) throws Exception
ChannelFuture
has been completed.future
- the source ChannelFuture
which called this
callbackException
Copyright © 2008-2016 The Netty Project. All Rights Reserved.