Package io.helidon.common.context.http
Interface ContextRecordConfig
- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
ContextRecordConfig.BuilderBase.ContextRecordConfigImpl
Configuration of a single propagation record, a mapping of a header name to its context classifier, with optional
default value(s), and definition whether it is a single value, or an array.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forContextRecordConfig.static classContextRecordConfig.BuilderBase<BUILDER extends ContextRecordConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ContextRecordConfig> Fluent API builder base forContextRecordConfig. -
Method Summary
Modifier and TypeMethodDescriptionbooleanarray()Whether to treat the option as an array of strings.static ContextRecordConfig.Builderbuilder()Create a new fluent API builder to customize configuration.static ContextRecordConfig.Builderbuilder(ContextRecordConfig instance) Create a new fluent API builder from an existing instance.String classifier of the value that will be used withContext.get(Object, Class).static ContextRecordConfigcreate()Create a new instance with default values.static ContextRecordConfigDeprecated.static ContextRecordConfigCreate a new instance from configuration.Default value to send if not configured in context.Default values to send if not configured in context.header()Name of the header to use when sending the context value over the network.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Deprecated.Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
header
HeaderName 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
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
-
create(io.helidon.config.Config)