Module io.helidon.http.media
Package io.helidon.http.media
Class MediaContextConfig.BuilderBase<BUILDER extends MediaContextConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends MediaContextConfig>
java.lang.Object
io.helidon.http.media.MediaContextConfig.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:
MediaContextConfig.Builder
- Enclosing interface:
MediaContextConfig
public abstract static class MediaContextConfig.BuilderBase<BUILDER extends MediaContextConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends MediaContextConfig>
extends Object
implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
MediaContext
.-
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 TypeMethodDescriptionaddMediaSupport
(MediaSupport mediaSupport) Media supports to use.addMediaSupports
(List<? extends MediaSupport> mediaSupports) Media supports to use.Clear existing value of this property.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).fallback()
Existing context to be used as a fallback for this context.fallback
(MediaContext fallback) Existing context to be used as a fallback for this context.fallback
(MediaContextConfig fallbackConfig) Existing context to be used as a fallback for this context.fallback
(Consumer<MediaContextConfig.Builder> consumer) Existing context to be used as a fallback for this context.from
(MediaContextConfig prototype) Update this builder from an existing prototype instance.from
(MediaContextConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Media supports to use.mediaSupports
(List<? extends MediaSupport> mediaSupports) Media supports to use.mediaSupportsDiscoverServices
(boolean discoverServices) Media supports to use.protected void
Handles providers and decorators.boolean
Should we register defaults of Helidon, such as String media support.registerDefaults
(boolean registerDefaults) Should we register defaults of Helidon, such as String media support.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 MediaContextConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends MediaContextConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
mediaSupportsDiscoverServices
Media supports to use. This instance has priority over provider(s) discovered by service loader. The providers are used in order of calling this method, where the first support added is the first one to be queried for readers and writers.- Parameters:
discoverServices
- whether to discover implementations through service loader- Returns:
- updated builder instance
- See Also:
-
mediaSupports
Media supports to use. This instance has priority over provider(s) discovered by service loader. The providers are used in order of calling this method, where the first support added is the first one to be queried for readers and writers.- Parameters:
mediaSupports
- media supports- Returns:
- updated builder instance
- See Also:
-
addMediaSupports
Media supports to use. This instance has priority over provider(s) discovered by service loader. The providers are used in order of calling this method, where the first support added is the first one to be queried for readers and writers.- Parameters:
mediaSupports
- media supports- Returns:
- updated builder instance
- See Also:
-
addMediaSupport
Media supports to use. This instance has priority over provider(s) discovered by service loader. The providers are used in order of calling this method, where the first support added is the first one to be queried for readers and writers.- Parameters:
mediaSupport
- media supports- Returns:
- updated builder instance
- See Also:
-
clearFallback
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
fallback
Existing context to be used as a fallback for this context.- Parameters:
fallback
- media context to use if supports configured on this request cannot provide a good result- Returns:
- updated builder instance
- See Also:
-
fallback
Existing context to be used as a fallback for this context.- Parameters:
fallbackConfig
- media context to use if supports configured on this request cannot provide a good result- Returns:
- updated builder instance
- See Also:
-
fallback
Existing context to be used as a fallback for this context.- Parameters:
consumer
- media context to use if supports configured on this request cannot provide a good result- Returns:
- updated builder instance
- See Also:
-
registerDefaults
Should we register defaults of Helidon, such as String media support.- Parameters:
registerDefaults
- whether to register default media supports- Returns:
- updated builder instance
- See Also:
-
mediaSupports
Media supports to use. This instance has priority over provider(s) discovered by service loader. The providers are used in order of calling this method, where the first support added is the first one to be queried for readers and writers.- Returns:
- the media supports
-
fallback
Existing context to be used as a fallback for this context.- Returns:
- the fallback
-
registerDefaults
public boolean registerDefaults()Should we register defaults of Helidon, such as String media support.- Returns:
- the register defaults
-
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.
-