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

java.lang.Object
io.helidon.websocket.WsProtocolConfig.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:
WsClientProtocolConfig.BuilderBase, WsConfig.BuilderBase, WsProtocolConfig.Builder
Enclosing interface:
WsProtocolConfig

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

    • BuilderBase

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

    • from

      public BUILDER from(WsProtocolConfig 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(WsProtocolConfig.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 ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends WsProtocolConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends WsProtocolConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • maxBufferedMessageSize

      public BUILDER maxBufferedMessageSize(Size maxBufferedMessageSize)
      Maximum size of a WebSocket message buffered for delivery to a listener. Binary message size is measured in bytes. Text message size is approximated using the number of UTF-16 code units in each decoded string fragment, as reported by String.length(), and may be smaller than the UTF-8 payload size. This setting does not limit messages delivered to listeners as fragments, readers, or input streams. The value must be between 0 B and Integer.MAX_VALUE bytes, inclusive. A value of 0 B disables buffering of non-empty messages while allowing empty messages. Default is 1 MiB.
      Parameters:
      maxBufferedMessageSize - maximum size of a buffered message
      Returns:
      updated builder instance
      See Also:
    • maxBufferedMessageSize

      public Size maxBufferedMessageSize()
      Maximum size of a WebSocket message buffered for delivery to a listener. Binary message size is measured in bytes. Text message size is approximated using the number of UTF-16 code units in each decoded string fragment, as reported by String.length(), and may be smaller than the UTF-8 payload size. This setting does not limit messages delivered to listeners as fragments, readers, or input streams. The value must be between 0 B and Integer.MAX_VALUE bytes, inclusive. A value of 0 B disables buffering of non-empty messages while allowing empty messages. Default is 1 MiB.
      Returns:
      maximum size of a buffered message
    • 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