Package org.mockserver.netty.proxy.relay
Class DownstreamProxyRelayHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.HttpObject>
org.mockserver.netty.proxy.relay.DownstreamProxyRelayHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class DownstreamProxyRelayHandler
extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.HttpObject>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Constructor Summary
ConstructorsConstructorDescriptionDownstreamProxyRelayHandler(org.mockserver.logging.MockServerLogger mockServerLogger, io.netty.channel.Channel upstreamChannel) Relays with no bound on the streamed bytes not yet written toupstreamChannel.DownstreamProxyRelayHandler(org.mockserver.logging.MockServerLogger mockServerLogger, io.netty.channel.Channel upstreamChannel, long maxUnwrittenStreamedBytes) -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelActive(io.netty.channel.ChannelHandlerContext ctx) voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx) voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) voidchannelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpObject msg) voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessageMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Constructor Details
-
DownstreamProxyRelayHandler
public DownstreamProxyRelayHandler(org.mockserver.logging.MockServerLogger mockServerLogger, io.netty.channel.Channel upstreamChannel) Relays with no bound on the streamed bytes not yet written toupstreamChannel. -
DownstreamProxyRelayHandler
public DownstreamProxyRelayHandler(org.mockserver.logging.MockServerLogger mockServerLogger, io.netty.channel.Channel upstreamChannel, long maxUnwrittenStreamedBytes) - Parameters:
maxUnwrittenStreamedBytes- the most bytes of streamed (unaggregated) content relayed but not yet written toupstreamChannel, past which both channels are closed, normallymaxRequestBodySize; at zero or less the first streamed byte closes them. One read of a compressed response can decode to far more than any heap.
-
-
Method Details
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classio.netty.channel.ChannelInboundHandlerAdapter
-
channelRead
- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classio.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.HttpObject>- Throws:
Exception
-
channelRead0
public void channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpObject msg) - Specified by:
channelRead0in classio.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.HttpObject>
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.channel.ChannelInboundHandlerAdapter
-
exceptionCaught
- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter
-