Interface ChannelOutboundHandler
- All Superinterfaces:
ChannelHandler
- All Known Subinterfaces:
WebSocketFrameEncoder
- All Known Implementing Classes:
AbstractBinaryMemcacheEncoder, AbstractMemcacheObjectEncoder, AbstractSniHandler, AbstractTrafficShapingHandler, Base64Encoder, BinaryMemcacheClientCodec, BinaryMemcacheRequestEncoder, BinaryMemcacheResponseEncoder, BinaryMemcacheServerCodec, BrotliEncoder, ByteArrayEncoder, ByteToMessageCodec, Bzip2Encoder, ChannelDuplexHandler, ChannelOutboundHandlerAdapter, ChannelTrafficShapingHandler, ChunkedWriteHandler, CombinedChannelDuplexHandler, CompatibleMarshallingEncoder, CompatibleObjectEncoder, CorsHandler, DatagramDnsQueryEncoder, DatagramDnsResponseEncoder, DatagramPacketEncoder, DynamicAddressConnectHandler, FastLzFrameEncoder, FlowControlHandler, FlushConsolidationHandler, GlobalChannelTrafficShapingHandler, GlobalTrafficShapingHandler, HAProxyMessageEncoder, Http2ChannelDuplexHandler, Http2ConnectionHandler, Http2FrameCodec, Http2MultiplexCodec, Http2MultiplexHandler, Http2StreamFrameToHttpObjectCodec, HttpClientCodec, HttpClientUpgradeHandler, HttpContentCompressor, HttpContentEncoder, HttpObjectEncoder, HttpProxyHandler, HttpRequestEncoder, HttpResponseEncoder, HttpServerCodec, HttpServerKeepAliveHandler, HttpToHttp2ConnectionHandler, IdleStateHandler, JdkZlibEncoder, JZlibEncoder, LengthFieldPrepender, LineEncoder, LoggingHandler, Lz4FrameEncoder, LzfEncoder, LzmaFrameEncoder, MarshallingEncoder, MessageToByteEncoder, MessageToMessageCodec, MessageToMessageEncoder, MqttEncoder, ObjectEncoder, OcspServerCertificateValidator, PcapWriteHandler, ProtobufEncoder, ProtobufEncoderNano, ProtobufVarint32LengthFieldPrepender, ProxyHandler, ReadTimeoutHandler, RedisEncoder, ResolveAddressHandler, RtspEncoder, RtspObjectEncoder, RtspRequestEncoder, RtspResponseEncoder, SctpOutboundByteStreamHandler, SmtpRequestEncoder, SnappyFramedEncoder, SnappyFrameEncoder, SniHandler, Socks4ClientEncoder, Socks4ProxyHandler, Socks4ServerEncoder, Socks5ClientEncoder, Socks5ProxyHandler, Socks5ServerEncoder, SocksMessageEncoder, SpdyFrameCodec, SpdyHttpCodec, SpdyHttpEncoder, SpdyHttpResponseStreamIdHandler, SpdySessionHandler, SslClientHelloHandler, SslHandler, StompSubframeEncoder, StringEncoder, TcpDnsQueryEncoder, TcpDnsResponseEncoder, WebSocket00FrameEncoder, WebSocket07FrameEncoder, WebSocket08FrameEncoder, WebSocket13FrameEncoder, WebSocketClientCompressionHandler, WebSocketClientExtensionHandler, WebSocketClientProtocolHandler, WebSocketExtensionEncoder, WebSocketServerCompressionHandler, WebSocketServerExtensionHandler, WebSocketServerProtocolHandler, WriteTimeoutHandler, ZlibEncoder, ZstdEncoder
ChannelHandler which will get notified for IO-outbound-operations.-
Nested Class Summary
Nested classes/interfaces inherited from interface ChannelHandler
ChannelHandler.SharableModifier and TypeInterfaceDescriptionstatic @interfaceIndicates that the same instance of the annotatedChannelHandlercan be added to one or moreChannelPipelines multiple times without a race condition. -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) Called once a bind operation is made.voidclose(ChannelHandlerContext ctx, ChannelPromise promise) Called once a close operation is made.voidconnect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) Called once a connect operation is made.voidderegister(ChannelHandlerContext ctx, ChannelPromise promise) Called once a deregister operation is made from the current registeredEventLoop.voiddisconnect(ChannelHandlerContext ctx, ChannelPromise promise) Called once a disconnect operation is made.voidCalled once a flush operation is made.voidInterceptsChannelHandlerContext.read().voidwrite(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) Called once a write operation is made.Methods inherited from interface ChannelHandler
exceptionCaught, handlerAdded, handlerRemovedModifier and TypeMethodDescriptionvoidexceptionCaught(ChannelHandlerContext ctx, Throwable cause) Deprecated.voidGets called after theChannelHandlerwas added to the actual context and it's ready to handle events.voidGets called after theChannelHandlerwas removed from the actual context and it doesn't handle events anymore.
-
Method Details
-
bind
void bind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) throws Exception Called once a bind operation is made.- Parameters:
ctx- theChannelHandlerContextfor which the bind operation is madelocalAddress- theSocketAddressto which it should boundpromise- theChannelPromiseto notify once the operation completes- Throws:
Exception- thrown if an error occurs
-
connect
void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) throws Exception Called once a connect operation is made.- Parameters:
ctx- theChannelHandlerContextfor which the connect operation is maderemoteAddress- theSocketAddressto which it should connectlocalAddress- theSocketAddresswhich is used as source on connectpromise- theChannelPromiseto notify once the operation completes- Throws:
Exception- thrown if an error occurs
-
disconnect
Called once a disconnect operation is made.- Parameters:
ctx- theChannelHandlerContextfor which the disconnect operation is madepromise- theChannelPromiseto notify once the operation completes- Throws:
Exception- thrown if an error occurs
-
close
Called once a close operation is made.- Parameters:
ctx- theChannelHandlerContextfor which the close operation is madepromise- theChannelPromiseto notify once the operation completes- Throws:
Exception- thrown if an error occurs
-
deregister
Called once a deregister operation is made from the current registeredEventLoop.- Parameters:
ctx- theChannelHandlerContextfor which the close operation is madepromise- theChannelPromiseto notify once the operation completes- Throws:
Exception- thrown if an error occurs
-
read
InterceptsChannelHandlerContext.read().- Throws:
Exception
-
write
Called once a write operation is made. The write operation will write the messages through theChannelPipeline. Those are then ready to be flushed to the actualChannelonceChannel.flush()is called- Parameters:
ctx- theChannelHandlerContextfor which the write operation is mademsg- the message to writepromise- theChannelPromiseto notify once the operation completes- Throws:
Exception- thrown if an error occurs
-
flush
Called once a flush operation is made. The flush operation will try to flush out all previous written messages that are pending.- Parameters:
ctx- theChannelHandlerContextfor which the flush operation is made- Throws:
Exception- thrown if an error occurs
-
ChannelInboundHandlerand implement the method there.