Package org.jboss.netty.channel
Interface ChannelFutureListener
- All Superinterfaces:
EventListener
- All Known Subinterfaces:
ChannelFutureProgressListener
- All Known Implementing Classes:
ChannelFutureNotifier
,SecureChatServerHandler.Greeter
,SpdyHttpEncoder.SpdyFrameWriter
,SpdySessionHandler.ClosingChannelFutureListener
,SslHandler.ClosingChannelFutureListener
,WriteTimeoutHandler.TimeoutCanceller
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(ChannelFutureListener)
.
Return the control to the caller quickly
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ChannelFutureListener
AChannelFutureListener
that closes theChannel
which is associated with the specifiedChannelFuture
.static final ChannelFutureListener
AChannelFutureListener
that closes theChannel
when the operation ended up with a failure or cancellation rather than a success. -
Method Summary
Modifier and TypeMethodDescriptionvoid
operationComplete
(ChannelFuture future) Invoked when the I/O operation associated with theChannelFuture
has been completed.
-
Field Details
-
CLOSE
AChannelFutureListener
that closes theChannel
which is associated with the specifiedChannelFuture
. -
CLOSE_ON_FAILURE
AChannelFutureListener
that closes theChannel
when the operation ended up with a failure or cancellation rather than a success.
-
-
Method Details
-
operationComplete
Invoked when the I/O operation associated with theChannelFuture
has been completed.- Parameters:
future
- the sourceChannelFuture
which called this callback- Throws:
Exception
-