Class HttpClientCodec

    • Nested Class Summary

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

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

      Constructors 
      Constructor Description
      HttpClientCodec()
      Creates a new instance with the default decoder options (maxInitialLineLength (4096}, maxHeaderSize (8192), and maxChunkSize (8192)).
      HttpClientCodec​(int maxInitialLineLength, int maxHeaderSize)
      Creates a new instance with the specified decoder options.
      HttpClientCodec​(int maxInitialLineLength, int maxHeaderSize, boolean failOnMissingResponse)
      Creates a new instance with the specified decoder options.
      HttpClientCodec​(int maxInitialLineLength, int maxHeaderSize, boolean failOnMissingResponse, boolean validateHeaders)
      Creates a new instance with the specified decoder options.
      HttpClientCodec​(int maxInitialLineLength, int maxHeaderSize, boolean failOnMissingResponse, boolean validateHeaders, boolean parseHttpAfterConnectRequest)
      Creates a new instance with the specified decoder options.
      HttpClientCodec​(int maxInitialLineLength, int maxHeaderSize, boolean failOnMissingResponse, boolean validateHeaders, int initialBufferSize)
      Creates a new instance with the specified decoder options.
      HttpClientCodec​(int maxInitialLineLength, int maxHeaderSize, boolean failOnMissingResponse, boolean validateHeaders, int initialBufferSize, boolean parseHttpAfterConnectRequest)
      Creates a new instance with the specified decoder options.
      HttpClientCodec​(int maxInitialLineLength, int maxHeaderSize, boolean failOnMissingResponse, boolean validateHeaders, int initialBufferSize, boolean parseHttpAfterConnectRequest, boolean allowDuplicateContentLengths)
      Creates a new instance with the specified decoder options.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isSingleDecode()  
      void prepareUpgradeFrom​(io.netty5.channel.ChannelHandlerContext ctx)
      Prepares to upgrade to another protocol from HTTP.
      void setSingleDecode​(boolean singleDecode)  
      void upgradeFrom​(io.netty5.channel.ChannelHandlerContext ctx)
      Upgrades to another protocol from HTTP.
      • Methods inherited from class io.netty5.channel.CombinedChannelDuplexHandler

        bind, channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, handlerAdded, handlerRemoved, inboundHandler, init, outboundHandler, read, register, removeInboundHandler, removeOutboundHandler, userEventTriggered, write
      • Methods inherited from class io.netty5.channel.ChannelHandlerAdapter

        ensureNotSharable, isSharable
    • Field Detail

      • DEFAULT_FAIL_ON_MISSING_RESPONSE

        public static final boolean DEFAULT_FAIL_ON_MISSING_RESPONSE
        See Also:
        Constant Field Values
      • DEFAULT_PARSE_HTTP_AFTER_CONNECT_REQUEST

        public static final boolean DEFAULT_PARSE_HTTP_AFTER_CONNECT_REQUEST
        See Also:
        Constant Field Values
    • Constructor Detail

      • HttpClientCodec

        public HttpClientCodec()
        Creates a new instance with the default decoder options (maxInitialLineLength (4096}, maxHeaderSize (8192), and maxChunkSize (8192)).
      • HttpClientCodec

        public HttpClientCodec​(int maxInitialLineLength,
                               int maxHeaderSize)
        Creates a new instance with the specified decoder options.
      • HttpClientCodec

        public HttpClientCodec​(int maxInitialLineLength,
                               int maxHeaderSize,
                               boolean failOnMissingResponse)
        Creates a new instance with the specified decoder options.
      • HttpClientCodec

        public HttpClientCodec​(int maxInitialLineLength,
                               int maxHeaderSize,
                               boolean failOnMissingResponse,
                               boolean validateHeaders)
        Creates a new instance with the specified decoder options.
      • HttpClientCodec

        public HttpClientCodec​(int maxInitialLineLength,
                               int maxHeaderSize,
                               boolean failOnMissingResponse,
                               boolean validateHeaders,
                               boolean parseHttpAfterConnectRequest)
        Creates a new instance with the specified decoder options.
      • HttpClientCodec

        public HttpClientCodec​(int maxInitialLineLength,
                               int maxHeaderSize,
                               boolean failOnMissingResponse,
                               boolean validateHeaders,
                               int initialBufferSize)
        Creates a new instance with the specified decoder options.
      • HttpClientCodec

        public HttpClientCodec​(int maxInitialLineLength,
                               int maxHeaderSize,
                               boolean failOnMissingResponse,
                               boolean validateHeaders,
                               int initialBufferSize,
                               boolean parseHttpAfterConnectRequest)
        Creates a new instance with the specified decoder options.
      • HttpClientCodec

        public HttpClientCodec​(int maxInitialLineLength,
                               int maxHeaderSize,
                               boolean failOnMissingResponse,
                               boolean validateHeaders,
                               int initialBufferSize,
                               boolean parseHttpAfterConnectRequest,
                               boolean allowDuplicateContentLengths)
        Creates a new instance with the specified decoder options.
    • Method Detail

      • prepareUpgradeFrom

        public void prepareUpgradeFrom​(io.netty5.channel.ChannelHandlerContext ctx)
        Prepares to upgrade to another protocol from HTTP. Disables the HttpClientCodec.Encoder.
        Specified by:
        prepareUpgradeFrom in interface HttpClientUpgradeHandler.SourceCodec
      • upgradeFrom

        public void upgradeFrom​(io.netty5.channel.ChannelHandlerContext ctx)
        Upgrades to another protocol from HTTP. Removes the HttpClientCodec.Decoder and HttpClientCodec.Encoder from the pipeline.
        Specified by:
        upgradeFrom in interface HttpClientUpgradeHandler.SourceCodec
      • setSingleDecode

        public void setSingleDecode​(boolean singleDecode)
      • isSingleDecode

        public boolean isSingleDecode()