public class ChannelHandlerAdapter extends Object implements ChannelHandler
ChannelHandler.ChannelHandler.Sharable, ChannelHandler.Skip| Constructor and Description |
|---|
ChannelHandlerAdapter() |
public boolean isSharable()
public void handlerAdded(ChannelHandlerContext ctx) throws Exception
handlerAdded in interface ChannelHandlerExceptionpublic void handlerRemoved(ChannelHandlerContext ctx) throws Exception
handlerRemoved in interface ChannelHandlerExceptionpublic void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception
ChannelHandlerContext.fireExceptionCaught(Throwable) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.exceptionCaught in interface ChannelHandlerExceptionpublic void channelRegistered(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelRegistered() to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelRegistered in interface ChannelHandlerExceptionpublic void channelUnregistered(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelUnregistered() to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelUnregistered in interface ChannelHandlerExceptionpublic void channelActive(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelActive() to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelActive in interface ChannelHandlerExceptionpublic void channelInactive(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelInactive() to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelInactive in interface ChannelHandlerExceptionpublic void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
ChannelHandlerContext.fireChannelRead(Object) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelRead in interface ChannelHandlerExceptionpublic void channelReadComplete(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelReadComplete() to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelReadComplete in interface ChannelHandlerExceptionpublic void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception
ChannelHandlerContext.fireUserEventTriggered(Object) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.userEventTriggered in interface ChannelHandlerExceptionpublic void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.fireChannelWritabilityChanged() to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelWritabilityChanged in interface ChannelHandlerExceptionpublic void bind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) throws Exception
ChannelHandlerContext.bind(java.net.SocketAddress, ChannelPromise) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.bind in interface ChannelHandlerctx - the ChannelHandlerContext for which the bind operation is madelocalAddress - the SocketAddress to which it should boundpromise - the ChannelPromise to notify once the operation completesException - thrown if an error accourpublic void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) throws Exception
ChannelHandlerContext.connect(SocketAddress, SocketAddress, ChannelPromise) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.connect in interface ChannelHandlerctx - the ChannelHandlerContext for which the connect operation is maderemoteAddress - the SocketAddress to which it should connectlocalAddress - the SocketAddress which is used as source on connectpromise - the ChannelPromise to notify once the operation completesException - thrown if an error accourpublic void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception
ChannelHandlerContext.disconnect(ChannelPromise) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.disconnect in interface ChannelHandlerctx - the ChannelHandlerContext for which the disconnect operation is madepromise - the ChannelPromise to notify once the operation completesException - thrown if an error accourpublic void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception
ChannelHandlerContext.close(ChannelPromise) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.close in interface ChannelHandlerctx - the ChannelHandlerContext for which the close operation is madepromise - the ChannelPromise to notify once the operation completesException - thrown if an error accourpublic void deregister(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception
ChannelHandlerContext.deregister(ChannelPromise) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.deregister in interface ChannelHandlerctx - the ChannelHandlerContext for which the close operation is madepromise - the ChannelPromise to notify once the operation completesException - thrown if an error accourpublic void read(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.read() to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.read in interface ChannelHandlerExceptionpublic void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception
ChannelHandlerContext.write(Object) to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.write in interface ChannelHandlerctx - the ChannelHandlerContext for which the write operation is mademsg - the message to writepromise - the ChannelPromise to notify once the operation completesException - thrown if an error accourpublic void flush(ChannelHandlerContext ctx) throws Exception
ChannelHandlerContext.flush() to forward
to the next ChannelHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.flush in interface ChannelHandlerctx - the ChannelHandlerContext for which the flush operation is madeException - thrown if an error accourCopyright © 2008–2015 The Netty Project. All rights reserved.