Class PropagationRecord.Builder
- java.lang.Object
-
- io.helidon.webserver.context.propagation.PropagationRecord.Builder
-
- All Implemented Interfaces:
Builder<PropagationRecord>,Supplier<PropagationRecord>
- Enclosing interface:
- PropagationRecord
public static class PropagationRecord.Builder extends Object implements Builder<PropagationRecord>
Fluent API builder forPropagationRecord.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropagationRecord.Builderarray(boolean isArray)Whether this value is a String (false), or an array of Strings (true).PropagationRecordbuild()Build the instance from this builder.PropagationRecord.Builderclassifier(String classifier)Classifier of the value to be used withContext.register(Object, Object).PropagationRecord.Builderconfig(Config config)Update from configuration.PropagationRecord.BuilderdefaultValue(String... defaultValue)Default value to use, either a single string (any type), or an array of strings (only usable if this is an array).PropagationRecord.Builderheader(String headerName)Name of the header expected to contain value to be registered in context.
-
-
-
Method Detail
-
build
public PropagationRecord build()
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<PropagationRecord>- Returns:
- instance of the built type
-
config
public PropagationRecord.Builder config(Config config)
Update from configuration.- Parameters:
config- configuration to use- Returns:
- updated builder
-
classifier
public PropagationRecord.Builder classifier(String classifier)
Classifier of the value to be used withContext.register(Object, Object). Usesclassifierconfiguration key, and if not present, uses the header name.- Parameters:
classifier- classifier to use- Returns:
- updated builder
-
header
public PropagationRecord.Builder header(String headerName)
Name of the header expected to contain value to be registered in context. Usesheaderconfiguration key, and if not present, uses the classifier.- Parameters:
headerName- name of the header- Returns:
- updated builder
-
defaultValue
public PropagationRecord.Builder defaultValue(String... defaultValue)
Default value to use, either a single string (any type), or an array of strings (only usable if this is an array).- Parameters:
defaultValue- default value to register in case the header is not present in the request- Returns:
- updated builder
-
array
public PropagationRecord.Builder array(boolean isArray)
Whether this value is a String (false), or an array of Strings (true). To read the value from context, you need to use the correct type (e.g. an array cannot be read as a String).- Parameters:
isArray-trueto configure this as an array type, reading all values from the header- Returns:
- updated builder
-
-