Class Http1ClientConfig

java.lang.Object
io.vertx.core.http.Http1ClientConfig

@Unstable public class Http1ClientConfig extends Object
HTTP/1.x client configuration.
Author:
Julien Viet
  • Constructor Details

    • Http1ClientConfig

      public Http1ClientConfig()
    • Http1ClientConfig

      public Http1ClientConfig(Http1ClientConfig other)
  • Method Details

    • isKeepAlive

      public boolean isKeepAlive()
      Is keep alive enabled on the client?
      Returns:
      true if enabled
    • setKeepAlive

      public Http1ClientConfig setKeepAlive(boolean keepAlive)
      Set whether keep alive is enabled on the client
      Parameters:
      keepAlive - true if enabled
      Returns:
      a reference to this, so the API can be used fluently
    • getKeepAliveTimeout

      public Duration getKeepAliveTimeout()
      Returns:
      the keep alive timeout value in seconds for HTTP/1.x connections
    • setKeepAliveTimeout

      public Http1ClientConfig setKeepAliveTimeout(Duration keepAliveTimeout)

      Set the keep alive timeout for HTTP/1.1 connections. This value determines how long a connection remains unused in the pool before being evicted and closed. A timeout of zero or null means there is no timeout.

      Parameters:
      keepAliveTimeout - the timeout, in seconds
      Returns:
      a reference to this, so the API can be used fluently
    • isPipelining

      public boolean isPipelining()
      Is pipe-lining enabled on the client
      Returns:
      true if pipe-lining is enabled
    • setPipelining

      public Http1ClientConfig setPipelining(boolean pipelining)
      Set whether pipe-lining is enabled on the client
      Parameters:
      pipelining - true if enabled
      Returns:
      a reference to this, so the API can be used fluently
    • getPipeliningLimit

      public int getPipeliningLimit()
      Returns:
      the limit of pending requests a pipe-lined HTTP/1 connection can send
    • setPipeliningLimit

      public Http1ClientConfig setPipeliningLimit(int limit)
      Set the limit of pending requests a pipe-lined HTTP/1 connection can send.
      Parameters:
      limit - the limit of pending requests
      Returns:
      a reference to this, so the API can be used fluently
    • setMaxChunkSize

      public Http1ClientConfig setMaxChunkSize(int maxChunkSize)
      Set the maximum HTTP chunk size
      Parameters:
      maxChunkSize - the maximum chunk size
      Returns:
      a reference to this, so the API can be used fluently
    • getMaxChunkSize

      public int getMaxChunkSize()
      Returns the maximum HTTP chunk size
      Returns:
      the maximum HTTP chunk size
    • getMaxInitialLineLength

      public int getMaxInitialLineLength()
      Returns:
      the maximum length of the initial line for HTTP/1.x (e.g. "GET / HTTP/1.0")
    • setMaxInitialLineLength

      public Http1ClientConfig setMaxInitialLineLength(int maxInitialLineLength)
      Set the maximum length of the initial line for HTTP/1.x (e.g. "HTTP/1.1 200 OK")
      Parameters:
      maxInitialLineLength - the new maximum initial length
      Returns:
      a reference to this, so the API can be used fluently
    • getMaxHeaderSize

      public int getMaxHeaderSize()
      Returns:
      Returns the maximum length of all headers for HTTP/1.x
    • setMaxHeaderSize

      public Http1ClientConfig setMaxHeaderSize(int maxHeaderSize)
      Set the maximum length of all headers for HTTP/1.x .
      Parameters:
      maxHeaderSize - the new maximum length
      Returns:
      a reference to this, so the API can be used fluently
    • getDecoderInitialBufferSize

      public int getDecoderInitialBufferSize()
      Returns:
      the initial buffer size for the HTTP decoder
    • setDecoderInitialBufferSize

      public Http1ClientConfig setDecoderInitialBufferSize(int decoderInitialBufferSize)
      set to initialBufferSizeHttpDecoder the initial buffer of the HttpDecoder.
      Parameters:
      decoderInitialBufferSize - the initial buffer size
      Returns:
      a reference to this, so the API can be used fluently