Package io.helidon.common.context.http
Class ContextRecordConfig.BuilderBase<BUILDER extends ContextRecordConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ContextRecordConfig>
java.lang.Object
io.helidon.common.context.http.ContextRecordConfig.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:
ContextRecordConfig.Builder
- Enclosing interface:
ContextRecordConfig
public abstract static class ContextRecordConfig.BuilderBase<BUILDER extends ContextRecordConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ContextRecordConfig>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
ContextRecordConfig.-
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 TypeMethodDescriptionaddDefaultValue(String defaultValue) Default values to send if not configured in context.addDefaultValues(List<String> defaultValues) Default values to send if not configured in context.booleanarray()Whether to treat the option as an array of strings.array(boolean array) Whether to treat the option as an array of strings.String classifier of the value that will be used withContext.get(Object, Class).classifier(String classifier) String classifier of the value that will be used withContext.get(Object, Class).Clear existing value of classifier.Clear existing value of defaultValue.Clear all defaultValues.config()Configuration used to configure this instance.Deprecated.Update builder from configuration (node of this type).Default value to send if not configured in context.defaultValue(String defaultValue) Default value to send if not configured in context.Default values to send if not configured in context.defaultValues(List<String> defaultValues) Default values to send if not configured in context.from(ContextRecordConfig prototype) Update this builder from an existing prototype instance.from(ContextRecordConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.header()Name of the header to use when sending the context value over the network.header(HeaderName header) Name of the header to use when sending the context value over the network.protected voidHandles providers and decorators.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 ContextRecordConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ContextRecordConfig> - 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 ContextRecordConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ContextRecordConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
header
Name of the header to use when sending the context value over the network.- Parameters:
header- header name- Returns:
- updated builder instance
- See Also:
-
clearClassifier
Clear existing value of classifier.- Returns:
- updated builder instance
- See Also:
-
classifier
String classifier of the value that will be used withContext.get(Object, Class).- Parameters:
classifier- classifier to use, defaults to header name- Returns:
- updated builder instance
- See Also:
-
clearDefaultValue
Clear existing value of defaultValue.- Returns:
- updated builder instance
- See Also:
-
defaultValue
Default value to send if not configured in context.- Parameters:
defaultValue- default value, used for non-array records, or when only a single value is desired as a default for array- Returns:
- updated builder instance
- See Also:
-
clearDefaultValues
Clear all defaultValues.- Returns:
- updated builder instance
- See Also:
-
defaultValues
Default values to send if not configured in context. In case default values is an empty array, it will not be sent over the network if not present in context.- Parameters:
defaultValues- default values, used for array records; if this record is not an array, only the first value will be used- Returns:
- updated builder instance
- See Also:
-
addDefaultValues
Default values to send if not configured in context. In case default values is an empty array, it will not be sent over the network if not present in context.- Parameters:
defaultValues- default values, used for array records; if this record is not an array, only the first value will be used- Returns:
- updated builder instance
- See Also:
-
addDefaultValue
Default values to send if not configured in context. In case default values is an empty array, it will not be sent over the network if not present in context.- Parameters:
defaultValue- add single default values, used for array records; if this record is not an array, only the first value will be used- Returns:
- updated builder instance
- See Also:
-
array
Whether to treat the option as an array of strings. This would be read from the context as an array.- Parameters:
array- whether the record is an array- Returns:
- updated builder instance
- See Also:
-
header
Name of the header to use when sending the context value over the network.- Returns:
- header name
-
classifier
String classifier of the value that will be used withContext.get(Object, Class).- Returns:
- classifier to use, defaults to header name
-
defaultValue
Default value to send if not configured in context.- Returns:
- default value, used for non-array records, or when only a single value is desired as a default for array
-
defaultValues
Default values to send if not configured in context. In case default values is an empty array, it will not be sent over the network if not present in context.- Returns:
- default values, used for array records; if this record is not an array, only the first value will be used
-
array
public boolean array()Whether to treat the option as an array of strings. This would be read from the context as an array.- Returns:
- whether the record is an array
-
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)