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,Http3ClientConnectionHandler,Http3ConnectionHandler,Http3FrameToHttpObjectCodec,Http3PushStreamClientInitializer,Http3PushStreamServerInitializer,Http3RequestStreamInboundHandler,Http3RequestStreamInitializer,Http3ServerConnectionHandler,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,QuicCodecDispatcher,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,Socks5PrivateAuthRequestDecoder,Socks5PrivateAuthResponseDecoder,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
ChannelHandlerwhich 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 voidchannelActive(ChannelHandlerContext ctx)TheChannelof theChannelHandlerContextis now activevoidchannelInactive(ChannelHandlerContext ctx)TheChannelof theChannelHandlerContextwas registered is now inactive and reached its end of lifetime.voidchannelRead(ChannelHandlerContext ctx, java.lang.Object msg)Invoked when the currentChannelhas read a message from the peer.voidchannelReadComplete(ChannelHandlerContext ctx)Invoked when the last message read by the current read operation has been consumed bychannelRead(ChannelHandlerContext, Object).voidchannelRegistered(ChannelHandlerContext ctx)voidchannelUnregistered(ChannelHandlerContext ctx)voidchannelWritabilityChanged(ChannelHandlerContext ctx)Gets called once the writable state of aChannelchanged.voidexceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause)Gets called if aThrowablewas thrown.voiduserEventTriggered(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
TheChannelof theChannelHandlerContextis now active- Throws:
java.lang.Exception
-
channelInactive
void channelInactive(ChannelHandlerContext ctx) throws java.lang.Exception
TheChannelof theChannelHandlerContextwas 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 currentChannelhas 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_READis off, no further attempt to read an inbound data from the currentChannelwill 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 aChannelchanged. 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 aThrowablewas thrown.- Specified by:
exceptionCaughtin interfaceChannelHandler- Throws:
java.lang.Exception
-
-