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> ConfigBuilderSupport.ConfiguredBuilder<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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfig()Configuration used to configure this instance.Deprecated.Update builder from configuration (node of this type).ContentType option.contentType(HttpMediaType contentType) ContentType option.contentType(Consumer<HttpMediaType.Builder> consumer) ContentType option.contentType(Supplier<? extends HttpMediaType> supplier) ContentType option.booleanenabled()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 voidHandles providers and decorators.intLength 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 voidValidates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
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
Deprecated.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 LogStreamConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends LogStreamConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- 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 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
ContentType option.- Parameters:
contentType- the contentType option- Returns:
- updated builder instance
- See Also:
-
contentType
ContentType option.- Parameters:
consumer- consumer of builder of the contentType option- Returns:
- updated builder instance
- See Also:
-
contentType
ContentType option.- Parameters:
supplier- supplier of the contentType option- 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:
- whether to allow streaming of log statements
-
contentType
ContentType option.- Returns:
- the contentType option
-
idleMessageTimeout
How long to wait before we send the idle message, to make sure we keep the stream alive.- Returns:
- if no messages appear within this duration, and idle message will be sent
- 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:
- size of the in-memory queue for log messages
-
idleString
String sent when there are no log messages within theidleMessageTimeout().- Returns:
- string to write over the network when no log messages are received
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
Configuration used to configure this instance.- Returns:
- config instance
-
config(io.helidon.config.Config)