Class DefaultHttpClient.HttpClientInitializer

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler
    Enclosing class:
    DefaultHttpClient

    protected class DefaultHttpClient.HttpClientInitializer
    extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
    Initializes the HTTP client channel.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected HttpClientInitializer​(io.netty.handler.ssl.SslContext sslContext, java.lang.String host, int port, boolean stream, boolean proxy, boolean acceptsEvents, java.util.function.Consumer<io.netty.channel.ChannelHandlerContext> contextConsumer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addFinalHandler​(io.netty.channel.ChannelPipeline pipeline)
      Allows overriding the final handler added to the pipeline.
      protected void initChannel​(io.netty.channel.socket.SocketChannel ch)  
      • Methods inherited from class io.netty.channel.ChannelInitializer

        channelRegistered, exceptionCaught, handlerAdded, handlerRemoved
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, isSharable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpClientInitializer

        protected HttpClientInitializer​(io.netty.handler.ssl.SslContext sslContext,
                                        java.lang.String host,
                                        int port,
                                        boolean stream,
                                        boolean proxy,
                                        boolean acceptsEvents,
                                        java.util.function.Consumer<io.netty.channel.ChannelHandlerContext> contextConsumer)
        Parameters:
        sslContext - The ssl context
        host - The host
        port - The port
        stream - Whether is stream
        proxy - Is this a streaming proxy
        acceptsEvents - Whether an event stream is accepted
        contextConsumer - The context consumer
    • Method Detail

      • initChannel

        protected void initChannel​(io.netty.channel.socket.SocketChannel ch)
        Specified by:
        initChannel in class io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
        Parameters:
        ch - The channel
      • addFinalHandler

        protected void addFinalHandler​(io.netty.channel.ChannelPipeline pipeline)
        Allows overriding the final handler added to the pipeline.
        Parameters:
        pipeline - The pipeline