Package org.jboss.netty.channel
Interface ChannelFutureListener
-
- All Superinterfaces:
java.util.EventListener
- All Known Subinterfaces:
ChannelFutureProgressListener
- All Known Implementing Classes:
ChannelFutureNotifier,SecureChatServerHandler.Greeter,SpdyHttpEncoder.SpdyFrameWriter,SpdySessionHandler.ClosingChannelFutureListener,SslHandler.ClosingChannelFutureListener,WriteTimeoutHandler.TimeoutCanceller
public interface ChannelFutureListener extends java.util.EventListenerListens to the result of aChannelFuture. The result of the asynchronousChannelI/O operation is notified once this listener is added by callingChannelFuture.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
Fields Modifier and Type Field Description static ChannelFutureListenerCLOSEAChannelFutureListenerthat closes theChannelwhich is associated with the specifiedChannelFuture.static ChannelFutureListenerCLOSE_ON_FAILUREAChannelFutureListenerthat closes theChannelwhen the operation ended up with a failure or cancellation rather than a success.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidoperationComplete(ChannelFuture future)Invoked when the I/O operation associated with theChannelFuturehas been completed.
-
-
-
Field Detail
-
CLOSE
static final ChannelFutureListener CLOSE
AChannelFutureListenerthat closes theChannelwhich is associated with the specifiedChannelFuture.
-
CLOSE_ON_FAILURE
static final ChannelFutureListener CLOSE_ON_FAILURE
AChannelFutureListenerthat closes theChannelwhen the operation ended up with a failure or cancellation rather than a success.
-
-
Method Detail
-
operationComplete
void operationComplete(ChannelFuture future) throws java.lang.Exception
Invoked when the I/O operation associated with theChannelFuturehas been completed.- Parameters:
future- the sourceChannelFuturewhich called this callback- Throws:
java.lang.Exception
-
-