Package io.netty.handler.proxy
Class HttpProxyHandler.HttpClientCodecWrapper
java.lang.Object
io.netty.handler.proxy.HttpProxyHandler.HttpClientCodecWrapper
- All Implemented Interfaces:
ChannelHandler,ChannelInboundHandler,ChannelOutboundHandler
- Enclosing class:
HttpProxyHandler
private static final class HttpProxyHandler.HttpClientCodecWrapper
extends Object
implements ChannelInboundHandler, ChannelOutboundHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) Called once a bind operation is made.voidTheChannelof theChannelHandlerContextis now activevoidTheChannelof theChannelHandlerContextwas registered is now inactive and reached its end of lifetime.voidchannelRead(ChannelHandlerContext ctx, Object msg) Invoked when the currentChannelhas read a message from the peer.voidInvoked when the last message read by the current read operation has been consumed byChannelInboundHandler.channelRead(ChannelHandlerContext, Object).voidvoidvoidGets called once the writable state of aChannelchanged.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.voidexceptionCaught(ChannelHandlerContext ctx, Throwable cause) Gets called if aThrowablewas thrown.voidCalled once a flush operation is made.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.voidInterceptsChannelHandlerContext.read().voiduserEventTriggered(ChannelHandlerContext ctx, Object evt) Gets called if an user event was triggered.voidwrite(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) Called once a write operation is made.
-
Field Details
-
codec
-
-
Constructor Details
-
HttpClientCodecWrapper
private HttpClientCodecWrapper()
-
-
Method Details
-
handlerAdded
Description copied from interface:ChannelHandlerGets called after theChannelHandlerwas added to the actual context and it's ready to handle events.- Specified by:
handlerAddedin interfaceChannelHandler- Throws:
Exception
-
handlerRemoved
Description copied from interface:ChannelHandlerGets called after theChannelHandlerwas removed from the actual context and it doesn't handle events anymore.- Specified by:
handlerRemovedin interfaceChannelHandler- Throws:
Exception
-
exceptionCaught
Description copied from interface:ChannelInboundHandlerGets called if aThrowablewas thrown.- Specified by:
exceptionCaughtin interfaceChannelHandler- Specified by:
exceptionCaughtin interfaceChannelInboundHandler- Throws:
Exception
-
channelRegistered
Description copied from interface:ChannelInboundHandler- Specified by:
channelRegisteredin interfaceChannelInboundHandler- Throws:
Exception
-
channelUnregistered
Description copied from interface:ChannelInboundHandler- Specified by:
channelUnregisteredin interfaceChannelInboundHandler- Throws:
Exception
-
channelActive
Description copied from interface:ChannelInboundHandlerTheChannelof theChannelHandlerContextis now active- Specified by:
channelActivein interfaceChannelInboundHandler- Throws:
Exception
-
channelInactive
Description copied from interface:ChannelInboundHandlerTheChannelof theChannelHandlerContextwas registered is now inactive and reached its end of lifetime.- Specified by:
channelInactivein interfaceChannelInboundHandler- Throws:
Exception
-
channelRead
Description copied from interface:ChannelInboundHandlerInvoked when the currentChannelhas read a message from the peer.- Specified by:
channelReadin interfaceChannelInboundHandler- Throws:
Exception
-
channelReadComplete
Description copied from interface:ChannelInboundHandlerInvoked when the last message read by the current read operation has been consumed byChannelInboundHandler.channelRead(ChannelHandlerContext, Object). IfChannelOption.AUTO_READis off, no further attempt to read an inbound data from the currentChannelwill be made untilChannelHandlerContext.read()is called.- Specified by:
channelReadCompletein interfaceChannelInboundHandler- Throws:
Exception
-
userEventTriggered
Description copied from interface:ChannelInboundHandlerGets called if an user event was triggered.- Specified by:
userEventTriggeredin interfaceChannelInboundHandler- Throws:
Exception
-
channelWritabilityChanged
Description copied from interface:ChannelInboundHandlerGets called once the writable state of aChannelchanged. You can check the state withChannel.isWritable().- Specified by:
channelWritabilityChangedin interfaceChannelInboundHandler- Throws:
Exception
-
bind
public void bind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) throws Exception Description copied from interface:ChannelOutboundHandlerCalled once a bind operation is made.- Specified by:
bindin interfaceChannelOutboundHandler- 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
public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) throws Exception Description copied from interface:ChannelOutboundHandlerCalled once a connect operation is made.- Specified by:
connectin interfaceChannelOutboundHandler- 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
Description copied from interface:ChannelOutboundHandlerCalled once a disconnect operation is made.- Specified by:
disconnectin interfaceChannelOutboundHandler- Parameters:
ctx- theChannelHandlerContextfor which the disconnect operation is madepromise- theChannelPromiseto notify once the operation completes- Throws:
Exception- thrown if an error occurs
-
close
Description copied from interface:ChannelOutboundHandlerCalled once a close operation is made.- Specified by:
closein interfaceChannelOutboundHandler- Parameters:
ctx- theChannelHandlerContextfor which the close operation is madepromise- theChannelPromiseto notify once the operation completes- Throws:
Exception- thrown if an error occurs
-
deregister
Description copied from interface:ChannelOutboundHandlerCalled once a deregister operation is made from the current registeredEventLoop.- Specified by:
deregisterin interfaceChannelOutboundHandler- Parameters:
ctx- theChannelHandlerContextfor which the close operation is madepromise- theChannelPromiseto notify once the operation completes- Throws:
Exception- thrown if an error occurs
-
read
Description copied from interface:ChannelOutboundHandlerInterceptsChannelHandlerContext.read().- Specified by:
readin interfaceChannelOutboundHandler- Throws:
Exception
-
write
Description copied from interface:ChannelOutboundHandlerCalled 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- Specified by:
writein interfaceChannelOutboundHandler- 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
Description copied from interface:ChannelOutboundHandlerCalled once a flush operation is made. The flush operation will try to flush out all previous written messages that are pending.- Specified by:
flushin interfaceChannelOutboundHandler- Parameters:
ctx- theChannelHandlerContextfor which the flush operation is made- Throws:
Exception- thrown if an error occurs
-