Class WsConfig.BuilderBase<BUILDER extends WsConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends WsConfig>
java.lang.Object
io.helidon.websocket.WsProtocolConfig.BuilderBase<BUILDER, PROTOTYPE>
io.helidon.webserver.websocket.WsConfig.BuilderBase<BUILDER, PROTOTYPE>
- Type Parameters:
BUILDER- type of the builder extending this abstract builderPROTOTYPE- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER, PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
- Direct Known Subclasses:
WsConfig.Builder
- Enclosing interface:
WsConfig
public abstract static class WsConfig.BuilderBase<BUILDER extends WsConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends WsConfig>
extends WsProtocolConfig.BuilderBase<BUILDER, PROTOTYPE>
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
Fluent API builder base for
WsConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class WsProtocolConfig.BuilderBase
WsProtocolConfig.BuilderBase.WsProtocolConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionWebSocket origins.addOrigins(Set<String> origins) WebSocket origins.Clear all origins.Update builder from configuration (node of this type).Update this builder from an existing prototype instance.from(WsConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.intMax WebSocket frame size supported by the server on a read operation.maxFrameLength(int maxFrameLength) Max WebSocket frame size supported by the server on a read operation.name()Name of this configuration.Name of this configuration.origins()WebSocket origins.WebSocket origins.protected voidHandles providers and decorators.toString()protected voidValidates required properties.Methods inherited from class WsProtocolConfig.BuilderBase
config, from, from, maxBufferedMessageSize, maxBufferedMessageSizeModifier and TypeMethodDescriptionconfig()Configuration used to configure this instance.from(WsProtocolConfig prototype) Update this builder from an existing prototype instance.from(WsProtocolConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Maximum size of a WebSocket message buffered for delivery to a listener.maxBufferedMessageSize(Size maxBufferedMessageSize) Maximum size of a WebSocket message buffered for delivery to a listener.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends WsConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends WsConfig>- Overrides:
configin classWsProtocolConfig.BuilderBase<BUILDER extends WsConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends WsConfig>- Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
clearOrigins
-
origins
WebSocket origins. If this set is empty, requests with anOriginheader must match the requestHostheader authority. If this set is non-empty, it acts as an explicit allowlist. Requests without anOriginheader are allowed.- Parameters:
origins- origins- Returns:
- updated builder instance
- See Also:
-
addOrigins
WebSocket origins. If this set is empty, requests with anOriginheader must match the requestHostheader authority. If this set is non-empty, it acts as an explicit allowlist. Requests without anOriginheader are allowed.- Parameters:
origins- origins- Returns:
- updated builder instance
- See Also:
-
addOrigin
WebSocket origins. If this set is empty, requests with anOriginheader must match the requestHostheader authority. If this set is non-empty, it acts as an explicit allowlist. Requests without anOriginheader are allowed.- Parameters:
origin- add single origins- Returns:
- updated builder instance
- See Also:
-
name
-
maxFrameLength
Max WebSocket frame size supported by the server on a read operation. Default is 1 MiB.- Parameters:
maxFrameLength- max frame size to read- Returns:
- updated builder instance
- See Also:
-
origins
-
name
-
maxFrameLength
public int maxFrameLength()Max WebSocket frame size supported by the server on a read operation. Default is 1 MiB.- Returns:
- max frame size to read
-
toString
- Overrides:
toStringin classWsProtocolConfig.BuilderBase<BUILDER extends WsConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends WsConfig>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototypein classWsProtocolConfig.BuilderBase<BUILDER extends WsConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends WsConfig>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototypein classWsProtocolConfig.BuilderBase<BUILDER extends WsConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends WsConfig>
-