Class Http1ClientProtocolConfig.BuilderBase<BUILDER extends Http1ClientProtocolConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Http1ClientProtocolConfig>

java.lang.Object
io.helidon.webclient.http1.Http1ClientProtocolConfig.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>, Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
Http1ClientProtocolConfig.Builder
Enclosing interface:
Http1ClientProtocolConfig

public abstract static class Http1ClientProtocolConfig.BuilderBase<BUILDER extends Http1ClientProtocolConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Http1ClientProtocolConfig> extends Object implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for Http1ClientProtocolConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(Http1ClientProtocolConfig prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(Http1ClientProtocolConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface Prototype.ConfiguredBuilder<BUILDER extends Http1ClientProtocolConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Http1ClientProtocolConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • name

      public BUILDER name(String name)
      Parameters:
      name -
      Returns:
      updated builder instance
      See Also:
    • defaultKeepAlive

      public BUILDER defaultKeepAlive(boolean defaultKeepAlive)
      Whether to use keep alive by default.
      Parameters:
      defaultKeepAlive - true for keeping connections alive and re-using them for multiple requests (default), false to create a new connection for each request
      Returns:
      updated builder instance
      See Also:
    • maxHeaderSize

      public BUILDER maxHeaderSize(int maxHeaderSize)
      Configure the maximum allowed header size of the response.
      Parameters:
      maxHeaderSize - maximum header size
      Returns:
      updated builder instance
      See Also:
    • maxStatusLineLength

      public BUILDER maxStatusLineLength(int maxStatusLineLength)
      Configure the maximum allowed length of the status line from the response.
      Parameters:
      maxStatusLineLength - maximum status line length
      Returns:
      updated builder instance
      See Also:
    • validateRequestHeaders

      public BUILDER validateRequestHeaders(boolean validateRequestHeaders)
      Sets whether the request header format is validated or not.

      Defaults to false as user has control on the header creation.

      Parameters:
      validateRequestHeaders - whether request header validation should be enabled
      Returns:
      updated builder instance
      See Also:
    • validateResponseHeaders

      public BUILDER validateResponseHeaders(boolean validateResponseHeaders)
      Sets whether the response header format is validated or not.

      Defaults to true.

      Parameters:
      validateResponseHeaders - whether response header validation should be enabled
      Returns:
      updated builder instance
      See Also:
    • name

      public String name()
      Returns:
      the name
    • defaultKeepAlive

      public boolean defaultKeepAlive()
      Whether to use keep alive by default.
      Returns:
      the default keep alive
    • maxHeaderSize

      public int maxHeaderSize()
      Configure the maximum allowed header size of the response.
      Returns:
      the max header size
    • maxStatusLineLength

      public int maxStatusLineLength()
      Configure the maximum allowed length of the status line from the response.
      Returns:
      the max status line length
    • validateRequestHeaders

      public boolean validateRequestHeaders()
      Sets whether the request header format is validated or not.

      Defaults to false as user has control on the header creation.

      Returns:
      the validate request headers
    • validateResponseHeaders

      public boolean validateResponseHeaders()
      Sets whether the response header format is validated or not.

      Defaults to true.

      Returns:
      the validate response headers
    • config

      public Optional<Config> config()
      If this instance was configured, this would be the config instance used.
      Returns:
      config node used to configure this builder, or empty if not configured
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.