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

java.lang.Object
io.helidon.nima.webserver.http1.Http1Config.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:
io.helidon.builder.api.Prototype.Api, io.helidon.builder.api.Prototype.Builder<BUILDER,PROTOTYPE>, io.helidon.builder.api.Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>, io.helidon.common.config.NamedService, Http1Config, ProtocolConfig
Direct Known Subclasses:
Http1Config.Builder
Enclosing interface:
Http1Config

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

    • BuilderBase

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

    • from

      public BUILDER from(Http1Config prototype)
      Update this builder from an existing prototype instance.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(Http1Config.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
    • preBuildPrototype

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

      protected void validatePrototype()
      Validates required properties.
    • config

      public BUILDER config(io.helidon.common.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 io.helidon.builder.api.Prototype.ConfiguredBuilder<BUILDER extends Http1Config.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Http1Config>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • name

      public BUILDER name(String name)
      Name of this configuration, in most cases the same as NamedService.type().
      Parameters:
      name - name of this configuration
      Returns:
      updated builder instance
      See Also:
    • maxPrologueLength

      public BUILDER maxPrologueLength(int maxPrologueLength)
      Maximal size of received HTTP prologue (GET /path HTTP/1.1).
      Parameters:
      maxPrologueLength - maximal size in bytes
      Returns:
      updated builder instance
      See Also:
    • maxHeadersSize

      public BUILDER maxHeadersSize(int maxHeadersSize)
      Maximal size of received headers in bytes.
      Parameters:
      maxHeadersSize - maximal header size
      Returns:
      updated builder instance
      See Also:
    • validateHeaders

      public BUILDER validateHeaders(boolean validateHeaders)
      Whether to validate headers. If set to false, any value is accepted, otherwise validates headers + 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)).
      Parameters:
      validateHeaders - whether to validate headers
      Returns:
      updated builder instance
      See Also:
    • validatePath

      public BUILDER validatePath(boolean validatePath)
      If set to false, any path is accepted (even containing illegal characters).
      Parameters:
      validatePath - whether to validate path
      Returns:
      updated builder instance
      See Also:
    • receiveLog

      public BUILDER receiveLog(boolean receiveLog)
      Logging of received packets. Uses trace and debug levels on logger of Http1LoggingConnectionListener with suffix of .recv`.
      Parameters:
      receiveLog - true if logging should be enabled for received packets, false if no logging should be done
      Returns:
      updated builder instance
      See Also:
    • sendLog

      public BUILDER sendLog(boolean sendLog)
      Logging of sent packets. Uses trace and debug levels on logger of Http1LoggingConnectionListener with suffix of .send`.
      Parameters:
      sendLog - true if logging should be enabled for sent packets, false if no logging should be done
      Returns:
      updated builder instance
      See Also:
    • continueImmediately

      public BUILDER continueImmediately(boolean continueImmediately)
      When true WebServer answers to expect continue with 100 continue immediately, not waiting for user to actually request the data.
      Parameters:
      continueImmediately - if true answer with 100 continue immediately after expect continue
      Returns:
      updated builder instance
      See Also:
    • requestedUriDiscovery

      public BUILDER requestedUriDiscovery(RequestedUriDiscoveryContext requestedUriDiscovery)
      Requested URI discovery settings.
      Parameters:
      requestedUriDiscovery - settings for computing the requested URI
      Returns:
      updated builder instance
      See Also:
    • requestedUriDiscovery

      public BUILDER requestedUriDiscovery(Consumer<RequestedUriDiscoveryContext.Builder> consumer)
      Requested URI discovery settings.
      Parameters:
      consumer - consumer of builder for settings for computing the requested URI
      Returns:
      updated builder instance
      See Also:
    • sendListeners

      public BUILDER sendListeners(List<? extends Http1ConnectionListener> sendListeners)
      Connection send event listeners for HTTP/1.1.
      Parameters:
      sendListeners - send event listeners
      Returns:
      updated builder instance
      See Also:
    • addSendListeners

      public BUILDER addSendListeners(List<? extends Http1ConnectionListener> sendListeners)
      Connection send event listeners for HTTP/1.1.
      Parameters:
      sendListeners - send event listeners
      Returns:
      updated builder instance
      See Also:
    • addSendListener

      public BUILDER addSendListener(Http1ConnectionListener sendListener)
      Connection send event listeners for HTTP/1.1.
      Parameters:
      sendListener - send event listeners
      Returns:
      updated builder instance
      See Also:
    • receiveListeners

      public BUILDER receiveListeners(List<? extends Http1ConnectionListener> receiveListeners)
      Connection receive event listeners for HTTP/1.1.
      Parameters:
      receiveListeners - receive event listeners
      Returns:
      updated builder instance
      See Also:
    • addReceiveListeners

      public BUILDER addReceiveListeners(List<? extends Http1ConnectionListener> receiveListeners)
      Connection receive event listeners for HTTP/1.1.
      Parameters:
      receiveListeners - receive event listeners
      Returns:
      updated builder instance
      See Also:
    • addReceiveListener

      public BUILDER addReceiveListener(Http1ConnectionListener receiveListener)
      Connection receive event listeners for HTTP/1.1.
      Parameters:
      receiveListener - receive event listeners
      Returns:
      updated builder instance
      See Also:
    • compositeSendListener

      public BUILDER compositeSendListener(Http1ConnectionListener compositeSendListener)
      A single send listener, this value is computed.
      Parameters:
      compositeSendListener - send listener
      Returns:
      updated builder instance
      See Also:
    • compositeReceiveListener

      public BUILDER compositeReceiveListener(Http1ConnectionListener compositeReceiveListener)
      A single receive listener, this value is computed.
      Parameters:
      compositeReceiveListener - receive listener
      Returns:
      updated builder instance
      See Also:
    • name

      public String name()
      Name of this configuration, in most cases the same as NamedService.type().
      Specified by:
      name in interface io.helidon.common.config.NamedService
      Returns:
      the name
    • maxPrologueLength

      public int maxPrologueLength()
      Maximal size of received HTTP prologue (GET /path HTTP/1.1).
      Returns:
      the max prologue length
    • maxHeadersSize

      public int maxHeadersSize()
      Maximal size of received headers in bytes.
      Returns:
      the max headers size
    • validateHeaders

      public boolean validateHeaders()
      Whether to validate headers. If set to false, any value is accepted, otherwise validates headers + 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)).
      Returns:
      the validate headers
    • validatePath

      public boolean validatePath()
      If set to false, any path is accepted (even containing illegal characters).
      Returns:
      the validate path
    • receiveLog

      public boolean receiveLog()
      Logging of received packets. Uses trace and debug levels on logger of Http1LoggingConnectionListener with suffix of .recv`.
      Returns:
      the receive log
    • sendLog

      public boolean sendLog()
      Logging of sent packets. Uses trace and debug levels on logger of Http1LoggingConnectionListener with suffix of .send`.
      Returns:
      the send log
    • continueImmediately

      public boolean continueImmediately()
      When true WebServer answers to expect continue with 100 continue immediately, not waiting for user to actually request the data.
      Returns:
      the continue immediately
    • requestedUriDiscovery

      public RequestedUriDiscoveryContext requestedUriDiscovery()
      Requested URI discovery settings.
      Returns:
      the requested uri discovery
    • sendListeners

      public List<Http1ConnectionListener> sendListeners()
      Connection send event listeners for HTTP/1.1.
      Returns:
      the send listeners
    • receiveListeners

      public List<Http1ConnectionListener> receiveListeners()
      Connection receive event listeners for HTTP/1.1.
      Returns:
      the receive listeners
    • compositeSendListener

      public Http1ConnectionListener compositeSendListener()
      A single send listener, this value is computed.
      Returns:
      the composite send listener
    • compositeReceiveListener

      public Http1ConnectionListener compositeReceiveListener()
      A single receive listener, this value is computed.
      Returns:
      the composite receive listener
    • config

      public Optional<io.helidon.common.config.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
    • type

      default String type()
      Protocol configuration type.
      Specified by:
      type in interface io.helidon.common.config.NamedService
      Returns:
      type of this configuration