Class DefaultOriginChannelInitializer

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelInitializer<io.netty.channel.Channel>
com.netflix.zuul.netty.connectionpool.OriginChannelInitializer
com.netflix.zuul.netty.connectionpool.DefaultOriginChannelInitializer
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class DefaultOriginChannelInitializer extends OriginChannelInitializer
Default Origin Channel Initializer Author: Arthur Gonigberg Date: December 01, 2017
  • Field Details

  • Constructor Details

    • DefaultOriginChannelInitializer

      public DefaultOriginChannelInitializer(ConnectionPoolConfig connPoolConfig, com.netflix.spectator.api.Registry spectatorRegistry)
  • Method Details

    • initChannel

      protected void initChannel(io.netty.channel.Channel ch) throws Exception
      Specified by:
      initChannel in class io.netty.channel.ChannelInitializer<io.netty.channel.Channel>
      Throws:
      Exception
    • getClientSslContext

      protected io.netty.handler.ssl.SslContext getClientSslContext(com.netflix.spectator.api.Registry spectatorRegistry)
      This method can be overridden to create your own custom SSL context
      Parameters:
      spectatorRegistry - metrics registry
      Returns:
      Netty SslContext
    • addMethodBindingHandler

      protected void addMethodBindingHandler(io.netty.channel.ChannelPipeline pipeline)
      This method can be overridden to add your own MethodBinding handler for preserving thread locals or thread variables. This should be a handler that binds downstream channelRead and userEventTriggered with the MethodBinding class. It should be added using the pipeline.addLast method.
      Parameters:
      pipeline - the channel pipeline
    • getHttpMetricsHandler

      public HttpMetricsChannelHandler getHttpMetricsHandler()
      Specified by:
      getHttpMetricsHandler in class OriginChannelInitializer