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
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    channelInactive(io.netty.channel.ChannelHandlerContext ctx)
     
    final void
    channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)
     
    protected void
    Override to add custom modifications to the request before it goes out
    void
    exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
     
    protected void
    postCompleteHook(io.netty.channel.ChannelHandlerContext ctx, Object evt)
    Override to add custom post complete functionality
    protected void
    preWriteHook(io.netty.channel.ChannelHandlerContext ctx, HttpRequestMessage zuulReq)
    Override to add custom pre-write functionality
    void
     
    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

  • Constructor Details

    • OriginResponseReceiver

      public OriginResponseReceiver(ProxyEndpoint edgeProxy)
  • Method Details

    • unlinkFromClientRequest

      public void unlinkFromClientRequest()
    • channelRead

      public final void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
      Specified by:
      channelRead in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • userEventTriggered

      public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception
      Specified by:
      userEventTriggered in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      userEventTriggered in class io.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 context
      evt - - netty event
      Throws:
      Exception
    • customRequestProcessing

      protected void customRequestProcessing(HttpRequestMessage headers)
      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 interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      write in class io.netty.channel.ChannelDuplexHandler
      Throws:
      Exception
    • preWriteHook

      protected void preWriteHook(io.netty.channel.ChannelHandlerContext ctx, HttpRequestMessage zuulReq)
      Override to add custom pre-write functionality
      Parameters:
      ctx - channel handler context
      zuulReq - request message to modify
    • exceptionCaught

      public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
      Specified by:
      exceptionCaught in interface io.netty.channel.ChannelHandler
      Specified by:
      exceptionCaught in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      exceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • channelInactive

      public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelInactive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception