Package io.helidon.webserver.observe.log
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 builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> Prototype.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 Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
LogStreamConfig
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconfig()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).contentType
(Config contentTypeConfig) contentType
(HttpMediaType contentType) contentType
(Consumer<HttpMediaType.Builder> consumer) contentType
(Supplier<? extends HttpMediaType> supplier) boolean
enabled()
Whether stream is enabled.enabled
(boolean enabled) Whether stream is enabled.from
(LogStreamConfig prototype) Update this builder from an existing prototype instance.from
(LogStreamConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.How long to wait before we send the idle message, to make sure we keep the stream alive.idleMessageTimeout
(Duration idleMessageTimeout) How long to wait before we send the idle message, to make sure we keep the stream alive.String sent when there are no log messages within theidleMessageTimeout()
.idleString
(String idleString) String sent when there are no log messages within theidleMessageTimeout()
.protected void
Handles providers and decorators.int
Length of the in-memory queue that buffers log messages from loggers before sending them over the network.queueSize
(int queueSize) Length of the in-memory queue that buffers log messages from loggers before sending them over the network.toString()
protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
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
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:
config
in interfacePrototype.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
Whether stream is enabled.- Parameters:
enabled
- whether to allow streaming of log statements- Returns:
- updated builder instance
- See Also:
-
contentType
- Parameters:
contentType
-- Returns:
- updated builder instance
- See Also:
-
contentType
- Parameters:
contentTypeConfig
-- Returns:
- updated builder instance
- See Also:
-
contentType
- Parameters:
consumer
- consumer of builder for- Returns:
- updated builder instance
- See Also:
-
contentType
- Parameters:
supplier
- supplier of- Returns:
- updated builder instance
- See Also:
-
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
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
String sent when there are no log messages within theidleMessageTimeout()
.- Parameters:
idleString
- string to write over the network when no log messages are received- Returns:
- updated builder instance
- See Also:
-
enabled
public boolean enabled()Whether stream is enabled.- Returns:
- the enabled
-
contentType
- Returns:
- the content type
-
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
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
String sent when there are no log messages within theidleMessageTimeout()
.- Returns:
- the idle string
-
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
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-