Package io.netty.channel
Class DefaultChannelPipeline.TailContext
- java.lang.Object
-
- io.netty.channel.AbstractChannelHandlerContext
-
- io.netty.channel.DefaultChannelPipeline.TailContext
-
- All Implemented Interfaces:
ChannelHandler
,ChannelHandlerContext
,ChannelInboundHandler
,ChannelInboundInvoker
,ChannelOutboundInvoker
,AttributeMap
,ResourceLeakHint
- Enclosing class:
- DefaultChannelPipeline
final class DefaultChannelPipeline.TailContext extends AbstractChannelHandlerContext implements ChannelInboundHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.netty.channel.AbstractChannelHandlerContext
AbstractChannelHandlerContext.WriteTask
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Field Summary
-
Fields inherited from class io.netty.channel.AbstractChannelHandlerContext
executor, next, prev
-
-
Constructor Summary
Constructors Constructor Description TailContext(DefaultChannelPipeline pipeline)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
channelActive(ChannelHandlerContext ctx)
TheChannel
of theChannelHandlerContext
is now activevoid
channelInactive(ChannelHandlerContext ctx)
TheChannel
of theChannelHandlerContext
was registered is now inactive and reached its end of lifetime.void
channelRead(ChannelHandlerContext ctx, java.lang.Object msg)
Invoked when the currentChannel
has read a message from the peer.void
channelReadComplete(ChannelHandlerContext ctx)
Invoked when the last message read by the current read operation has been consumed byChannelInboundHandler.channelRead(ChannelHandlerContext, Object)
.void
channelRegistered(ChannelHandlerContext ctx)
void
channelUnregistered(ChannelHandlerContext ctx)
void
channelWritabilityChanged(ChannelHandlerContext ctx)
Gets called once the writable state of aChannel
changed.void
exceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause)
Gets called if aThrowable
was thrown.ChannelHandler
handler()
TheChannelHandler
that is bound thisChannelHandlerContext
.void
handlerAdded(ChannelHandlerContext ctx)
Gets called after theChannelHandler
was added to the actual context and it's ready to handle events.void
handlerRemoved(ChannelHandlerContext ctx)
Gets called after theChannelHandler
was removed from the actual context and it doesn't handle events anymore.void
userEventTriggered(ChannelHandlerContext ctx, java.lang.Object evt)
Gets called if an user event was triggered.-
Methods inherited from class io.netty.channel.AbstractChannelHandlerContext
alloc, attr, bind, bind, callHandlerAdded, callHandlerRemoved, channel, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, executor, fireChannelActive, fireChannelInactive, fireChannelRead, fireChannelReadComplete, fireChannelRegistered, fireChannelUnregistered, fireChannelWritabilityChanged, fireExceptionCaught, fireUserEventTriggered, flush, hasAttr, invokeChannelActive, invokeChannelInactive, invokeChannelRead, invokeChannelReadComplete, invokeChannelRegistered, invokeChannelUnregistered, invokeChannelWritabilityChanged, invokeExceptionCaught, invokeUserEventTriggered, invokeWrite, invokeWriteAndFlush, isRemoved, name, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, pipeline, read, setAddComplete, setAddPending, setRemoved, toHintString, toString, voidPromise, write, write, writeAndFlush, writeAndFlush
-
-
-
-
Constructor Detail
-
TailContext
TailContext(DefaultChannelPipeline pipeline)
-
-
Method Detail
-
handler
public ChannelHandler handler()
Description copied from interface:ChannelHandlerContext
TheChannelHandler
that is bound thisChannelHandlerContext
.- Specified by:
handler
in interfaceChannelHandlerContext
-
channelRegistered
public void channelRegistered(ChannelHandlerContext ctx)
Description copied from interface:ChannelInboundHandler
- Specified by:
channelRegistered
in interfaceChannelInboundHandler
-
channelUnregistered
public void channelUnregistered(ChannelHandlerContext ctx)
Description copied from interface:ChannelInboundHandler
- Specified by:
channelUnregistered
in interfaceChannelInboundHandler
-
channelActive
public void channelActive(ChannelHandlerContext ctx)
Description copied from interface:ChannelInboundHandler
TheChannel
of theChannelHandlerContext
is now active- Specified by:
channelActive
in interfaceChannelInboundHandler
-
channelInactive
public void channelInactive(ChannelHandlerContext ctx)
Description copied from interface:ChannelInboundHandler
TheChannel
of theChannelHandlerContext
was registered is now inactive and reached its end of lifetime.- Specified by:
channelInactive
in interfaceChannelInboundHandler
-
channelWritabilityChanged
public void channelWritabilityChanged(ChannelHandlerContext ctx)
Description copied from interface:ChannelInboundHandler
Gets called once the writable state of aChannel
changed. You can check the state withChannel.isWritable()
.- Specified by:
channelWritabilityChanged
in interfaceChannelInboundHandler
-
handlerAdded
public void handlerAdded(ChannelHandlerContext ctx)
Description copied from interface:ChannelHandler
Gets called after theChannelHandler
was added to the actual context and it's ready to handle events.- Specified by:
handlerAdded
in interfaceChannelHandler
-
handlerRemoved
public void handlerRemoved(ChannelHandlerContext ctx)
Description copied from interface:ChannelHandler
Gets called after theChannelHandler
was removed from the actual context and it doesn't handle events anymore.- Specified by:
handlerRemoved
in interfaceChannelHandler
-
userEventTriggered
public void userEventTriggered(ChannelHandlerContext ctx, java.lang.Object evt)
Description copied from interface:ChannelInboundHandler
Gets called if an user event was triggered.- Specified by:
userEventTriggered
in interfaceChannelInboundHandler
-
exceptionCaught
public void exceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause)
Description copied from interface:ChannelInboundHandler
Gets called if aThrowable
was thrown.- Specified by:
exceptionCaught
in interfaceChannelHandler
- Specified by:
exceptionCaught
in interfaceChannelInboundHandler
-
channelRead
public void channelRead(ChannelHandlerContext ctx, java.lang.Object msg)
Description copied from interface:ChannelInboundHandler
Invoked when the currentChannel
has read a message from the peer.- Specified by:
channelRead
in interfaceChannelInboundHandler
-
channelReadComplete
public void channelReadComplete(ChannelHandlerContext ctx)
Description copied from interface:ChannelInboundHandler
Invoked when the last message read by the current read operation has been consumed byChannelInboundHandler.channelRead(ChannelHandlerContext, Object)
. IfChannelOption.AUTO_READ
is off, no further attempt to read an inbound data from the currentChannel
will be made untilChannelHandlerContext.read()
is called.- Specified by:
channelReadComplete
in interfaceChannelInboundHandler
-
-