Package io.netty.channel
Interface ChannelInboundHandler
-
- All Superinterfaces:
ChannelHandler
- All Known Subinterfaces:
WebSocketFrameDecoder
- All Known Implementing Classes:
AbstractBinaryMemcacheDecoder
,AbstractMemcacheObjectAggregator
,AbstractMemcacheObjectDecoder
,AbstractRemoteAddressFilter
,AbstractSniHandler
,AbstractTrafficShapingHandler
,ApplicationProtocolNegotiationHandler
,Base64Decoder
,BinaryMemcacheClientCodec
,BinaryMemcacheObjectAggregator
,BinaryMemcacheRequestDecoder
,BinaryMemcacheResponseDecoder
,BinaryMemcacheServerCodec
,BrotliDecoder
,ByteArrayDecoder
,ByteToMessageCodec
,ByteToMessageDecoder
,Bzip2Decoder
,ChannelDuplexHandler
,ChannelInboundHandlerAdapter
,ChannelInitializer
,ChannelTrafficShapingHandler
,ChunkedWriteHandler
,CleartextHttp2ServerUpgradeHandler
,CombinedChannelDuplexHandler
,CompatibleMarshallingDecoder
,CorsHandler
,DatagramDnsQueryDecoder
,DatagramDnsResponseDecoder
,DatagramPacketDecoder
,DelimiterBasedFrameDecoder
,FastLzFrameDecoder
,FixedLengthFrameDecoder
,FlowControlHandler
,FlushConsolidationHandler
,GlobalChannelTrafficShapingHandler
,GlobalTrafficShapingHandler
,HAProxyMessageDecoder
,Http2ChannelDuplexHandler
,Http2ConnectionHandler
,Http2FrameCodec
,Http2MultiplexCodec
,Http2MultiplexHandler
,Http2StreamFrameToHttpObjectCodec
,HttpClientCodec
,HttpClientUpgradeHandler
,HttpContentCompressor
,HttpContentDecoder
,HttpContentDecompressor
,HttpContentEncoder
,HttpObjectAggregator
,HttpObjectDecoder
,HttpProxyHandler
,HttpRequestDecoder
,HttpResponseDecoder
,HttpServerCodec
,HttpServerExpectContinueHandler
,HttpServerKeepAliveHandler
,HttpServerUpgradeHandler
,HttpToHttp2ConnectionHandler
,IdleStateHandler
,InboundHttpToHttp2Adapter
,IpSubnetFilter
,JdkZlibDecoder
,JsonObjectDecoder
,JZlibDecoder
,LengthFieldBasedFrameDecoder
,LineBasedFrameDecoder
,LoggingHandler
,Lz4FrameDecoder
,LzfDecoder
,MarshallingDecoder
,MessageAggregator
,MessageToMessageCodec
,MessageToMessageDecoder
,MqttDecoder
,ObjectDecoder
,OcspClientHandler
,OcspServerCertificateValidator
,OptionalSslHandler
,PcapWriteHandler
,ProtobufDecoder
,ProtobufDecoderNano
,ProtobufVarint32FrameDecoder
,ProxyHandler
,ReadTimeoutHandler
,RedisArrayAggregator
,RedisBulkStringAggregator
,RedisDecoder
,ReplayingDecoder
,RtspDecoder
,RtspObjectDecoder
,RtspRequestDecoder
,RtspResponseDecoder
,RuleBasedIpFilter
,SctpInboundByteStreamHandler
,SctpMessageCompletionHandler
,SctpMessageToMessageDecoder
,SimpleChannelInboundHandler
,SimpleUserEventChannelHandler
,SmtpResponseDecoder
,SnappyFramedDecoder
,SnappyFrameDecoder
,SniHandler
,Socks4ClientDecoder
,Socks4ProxyHandler
,Socks4ServerDecoder
,Socks5CommandRequestDecoder
,Socks5CommandResponseDecoder
,Socks5InitialRequestDecoder
,Socks5InitialResponseDecoder
,Socks5PasswordAuthRequestDecoder
,Socks5PasswordAuthResponseDecoder
,Socks5ProxyHandler
,SocksAuthRequestDecoder
,SocksAuthResponseDecoder
,SocksCmdRequestDecoder
,SocksCmdResponseDecoder
,SocksInitRequestDecoder
,SocksInitResponseDecoder
,SocksPortUnificationServerHandler
,SpdyFrameCodec
,SpdyHttpCodec
,SpdyHttpDecoder
,SpdyHttpResponseStreamIdHandler
,SpdySessionHandler
,SslClientHelloHandler
,SslHandler
,SslMasterKeyHandler
,StompSubframeAggregator
,StompSubframeDecoder
,StringDecoder
,TcpDnsQueryDecoder
,TcpDnsResponseDecoder
,UniqueIpFilter
,Utf8FrameValidator
,WebSocket00FrameDecoder
,WebSocket07FrameDecoder
,WebSocket08FrameDecoder
,WebSocket13FrameDecoder
,WebSocketClientCompressionHandler
,WebSocketClientExtensionHandler
,WebSocketClientProtocolHandler
,WebSocketExtensionDecoder
,WebSocketFrameAggregator
,WebSocketServerCompressionHandler
,WebSocketServerExtensionHandler
,WebSocketServerProtocolHandler
,XmlDecoder
,XmlFrameDecoder
,ZlibDecoder
,ZstdDecoder
public interface ChannelInboundHandler extends ChannelHandler
ChannelHandler
which adds callbacks for state changes. This allows the user to hook in to state changes easily.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Method Summary
All Methods Instance Methods Abstract 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 bychannelRead(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.void
userEventTriggered(ChannelHandlerContext ctx, java.lang.Object evt)
Gets called if an user event was triggered.-
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
-
-
-
Method Detail
-
channelRegistered
void channelRegistered(ChannelHandlerContext ctx) throws java.lang.Exception
- Throws:
java.lang.Exception
-
channelUnregistered
void channelUnregistered(ChannelHandlerContext ctx) throws java.lang.Exception
- Throws:
java.lang.Exception
-
channelActive
void channelActive(ChannelHandlerContext ctx) throws java.lang.Exception
TheChannel
of theChannelHandlerContext
is now active- Throws:
java.lang.Exception
-
channelInactive
void channelInactive(ChannelHandlerContext ctx) throws java.lang.Exception
TheChannel
of theChannelHandlerContext
was registered is now inactive and reached its end of lifetime.- Throws:
java.lang.Exception
-
channelRead
void channelRead(ChannelHandlerContext ctx, java.lang.Object msg) throws java.lang.Exception
Invoked when the currentChannel
has read a message from the peer.- Throws:
java.lang.Exception
-
channelReadComplete
void channelReadComplete(ChannelHandlerContext ctx) throws java.lang.Exception
Invoked when the last message read by the current read operation has been consumed bychannelRead(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.- Throws:
java.lang.Exception
-
userEventTriggered
void userEventTriggered(ChannelHandlerContext ctx, java.lang.Object evt) throws java.lang.Exception
Gets called if an user event was triggered.- Throws:
java.lang.Exception
-
channelWritabilityChanged
void channelWritabilityChanged(ChannelHandlerContext ctx) throws java.lang.Exception
Gets called once the writable state of aChannel
changed. You can check the state withChannel.isWritable()
.- Throws:
java.lang.Exception
-
exceptionCaught
void exceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause) throws java.lang.Exception
Gets called if aThrowable
was thrown.- Specified by:
exceptionCaught
in interfaceChannelHandler
- Throws:
java.lang.Exception
-
-