Package com.netflix.zuul.netty.server
Class OriginResponseReceiver
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
com.netflix.zuul.netty.server.OriginResponseReceiver
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
,io.netty.channel.ChannelOutboundHandler
public class OriginResponseReceiver
extends io.netty.channel.ChannelDuplexHandler
Created by saroskar on 1/18/17.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
channelInactive
(io.netty.channel.ChannelHandlerContext ctx) final void
channelRead
(io.netty.channel.ChannelHandlerContext ctx, Object msg) protected void
channelReadInternal
(io.netty.channel.ChannelHandlerContext ctx, Object msg) protected void
Override to add custom modifications to the request before it goes outvoid
exceptionCaught
(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) protected void
postCompleteHook
(io.netty.channel.ChannelHandlerContext ctx, Object evt) Override to add custom post complete functionalityprotected void
preWriteHook
(io.netty.channel.ChannelHandlerContext ctx, HttpRequestMessage zuulReq) Override to add custom pre-write functionalityvoid
void
userEventTriggered
(io.netty.channel.ChannelHandlerContext ctx, Object evt) final void
write
(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
CHANNEL_HANDLER_NAME
- See Also:
-
-
Constructor Details
-
OriginResponseReceiver
-
-
Method Details
-
unlinkFromClientRequest
public void unlinkFromClientRequest() -
channelRead
public final void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception - Specified by:
channelRead
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
channelReadInternal
protected void channelReadInternal(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception - Throws:
Exception
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception - Specified by:
userEventTriggered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
userEventTriggered
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
postCompleteHook
protected void postCompleteHook(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception Override to add custom post complete functionality- Parameters:
ctx
- - channel handler contextevt
- - netty event- Throws:
Exception
-
customRequestProcessing
Override to add custom modifications to the request before it goes out- Parameters:
headers
-
-
write
public final void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception - Specified by:
write
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
write
in classio.netty.channel.ChannelDuplexHandler
- Throws:
Exception
-
preWriteHook
Override to add custom pre-write functionality- Parameters:
ctx
- channel handler contextzuulReq
- request message to modify
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception - Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
channelInactive
- Specified by:
channelInactive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-