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

java.lang.Object
io.helidon.webserver.observe.log.LogStreamConfig.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>
Direct Known Subclasses:
LogStreamConfig.Builder
Enclosing interface:
LogStreamConfig

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

    • BuilderBase Link icon

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

    • from Link icon

      public BUILDER from(LogStreamConfig 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 Link icon

      public BUILDER from(LogStreamConfig.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 Link icon

      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 LogStreamConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends LogStreamConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • enabled Link icon

      public BUILDER enabled(boolean enabled)
      Whether stream is enabled.
      Parameters:
      enabled - whether to allow streaming of log statements
      Returns:
      updated builder instance
      See Also:
    • contentType Link icon

      public BUILDER contentType(HttpMediaType contentType)
      Parameters:
      contentType -
      Returns:
      updated builder instance
      See Also:
    • contentType Link icon

      public BUILDER contentType(Config contentTypeConfig)
      Parameters:
      contentTypeConfig -
      Returns:
      updated builder instance
      See Also:
    • contentType Link icon

      public BUILDER contentType(Consumer<HttpMediaType.Builder> consumer)
      Parameters:
      consumer - consumer of builder for
      Returns:
      updated builder instance
      See Also:
    • contentType Link icon

      public BUILDER contentType(Supplier<? extends HttpMediaType> supplier)
      Parameters:
      supplier - supplier of
      Returns:
      updated builder instance
      See Also:
    • idleMessageTimeout Link icon

      public BUILDER idleMessageTimeout(Duration idleMessageTimeout)
      How long to wait before we send the idle message, to make sure we keep the stream alive.
      Parameters:
      idleMessageTimeout - if no messages appear within this duration, and idle message will be sent
      Returns:
      updated builder instance
      See Also:
    • queueSize Link icon

      public BUILDER queueSize(int queueSize)
      Length of the in-memory queue that buffers log messages from loggers before sending them over the network. If the messages are produced faster than we can send them to client, excess messages are DISCARDED, and will not be sent.
      Parameters:
      queueSize - size of the in-memory queue for log messages
      Returns:
      updated builder instance
      See Also:
    • idleString Link icon

      public BUILDER idleString(String idleString)
      String sent when there are no log messages within the idleMessageTimeout().
      Parameters:
      idleString - string to write over the network when no log messages are received
      Returns:
      updated builder instance
      See Also:
    • enabled Link icon

      public boolean enabled()
      Whether stream is enabled.
      Returns:
      the enabled
    • contentType Link icon

      public HttpMediaType contentType()
      Returns:
      the content type
    • idleMessageTimeout Link icon

      public Duration idleMessageTimeout()
      How long to wait before we send the idle message, to make sure we keep the stream alive.
      Returns:
      the idle message timeout
      See Also:
    • queueSize Link icon

      public int queueSize()
      Length of the in-memory queue that buffers log messages from loggers before sending them over the network. If the messages are produced faster than we can send them to client, excess messages are DISCARDED, and will not be sent.
      Returns:
      the queue size
    • idleString Link icon

      public String idleString()
      String sent when there are no log messages within the idleMessageTimeout().
      Returns:
      the idle string
    • config Link icon

      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 Link icon

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

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

      protected void validatePrototype()
      Validates required properties.