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

java.lang.Object
io.helidon.http.HttpConfig.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>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
Http1ClientProtocolConfig.BuilderBase, Http1Config.BuilderBase, Http2ClientProtocolConfig.BuilderBase, Http2Config.BuilderBase, HttpConfig.Builder
Enclosing interface:
HttpConfig

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

    • BuilderBase

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

    • from

      public BUILDER from(HttpConfig 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(HttpConfig.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

      @Deprecated 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 ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends HttpConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends HttpConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      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 ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends HttpConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends HttpConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • maxBufferedEntitySize

      public BUILDER maxBufferedEntitySize(Size maxBufferedEntitySize)
      Configure the maximum size allowed for an entity that can be explicitly buffered by the application by calling io.helidon.http.media.ReadableEntity.buffer().
      Parameters:
      maxBufferedEntitySize - maximum size for a buffered entity
      Returns:
      updated builder instance
      See Also:
    • validateRequestHeaders

      public BUILDER validateRequestHeaders(boolean validateRequestHeaders)
      Whether to validate request headers. If set to false, any request header value is accepted, otherwise request headers and known headers are validated by format (content length is always validated as it is part of protocol processing (other headers may be validated if features use them)).

      Defaults to true.

      Parameters:
      validateRequestHeaders - whether to validate request headers
      Returns:
      updated builder instance
      See Also:
    • validateResponseHeaders

      public BUILDER validateResponseHeaders(boolean validateResponseHeaders)
      Whether to validate response headers. If set to false, any response header value is accepted, otherwise response headers and known headers are validated by format.

      Defaults to true. Disabling this setting can allow invalid response header values to be written.

      Parameters:
      validateResponseHeaders - whether to validate response headers
      Returns:
      updated builder instance
      See Also:
    • log

      public BUILDER log(HttpLogConfig log)
      HTTP Log configuration.
      Parameters:
      log - log configuration
      Returns:
      updated builder instance
      See Also:
    • log

      public BUILDER log(Consumer<HttpLogConfig.Builder> consumer)
      HTTP Log configuration.
      Parameters:
      consumer - consumer of builder of log configuration
      Returns:
      updated builder instance
      See Also:
    • log

      public BUILDER log(Supplier<? extends HttpLogConfig> supplier)
      HTTP Log configuration.
      Parameters:
      supplier - supplier of log configuration
      Returns:
      updated builder instance
      See Also:
    • maxBufferedEntitySize

      public Size maxBufferedEntitySize()
      Configure the maximum size allowed for an entity that can be explicitly buffered by the application by calling io.helidon.http.media.ReadableEntity.buffer().
      Returns:
      maximum size for a buffered entity
    • validateRequestHeaders

      public boolean validateRequestHeaders()
      Whether to validate request headers. If set to false, any request header value is accepted, otherwise request headers and known headers are validated by format (content length is always validated as it is part of protocol processing (other headers may be validated if features use them)).

      Defaults to true.

      Returns:
      whether to validate request headers
    • validateResponseHeaders

      public boolean validateResponseHeaders()
      Whether to validate response headers. If set to false, any response header value is accepted, otherwise response headers and known headers are validated by format.

      Defaults to true. Disabling this setting can allow invalid response header values to be written.

      Returns:
      whether to validate response headers
    • log

      public HttpLogConfig log()
      HTTP Log configuration.
      Returns:
      log configuration
    • toString

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

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

      protected void validatePrototype()
      Validates required properties.
    • config

      protected Optional<Config> config()
      Configuration used to configure this instance.
      Returns:
      config instance