Module io.helidon.http.media
Package io.helidon.http.media
Class MediaSupportConfig.BuilderBase<BUILDER extends MediaSupportConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends MediaSupportConfig>
java.lang.Object
io.helidon.http.media.MediaSupportConfig.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:
GsonSupportConfig.BuilderBase,JacksonSupportConfig.BuilderBase,JsonBindingSupportConfig.BuilderBase,JsonbSupportConfig.BuilderBase,JsonpSupportConfig.BuilderBase,JsonSupportConfig.BuilderBase,MediaSupportConfig.Builder
- Enclosing interface:
MediaSupportConfig
public abstract static class MediaSupportConfig.BuilderBase<BUILDER extends MediaSupportConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends MediaSupportConfig>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
MediaSupportConfig.-
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 TypeMethodDescriptionTypes accepted by this media support.acceptedMediaTypes(Set<? extends MediaType> acceptedMediaTypes) Types accepted by this media support.addAcceptedMediaType(MediaType acceptedMediaType) Types accepted by this media support.addAcceptedMediaTypes(Set<? extends MediaType> acceptedMediaTypes) Types accepted by this media support.Clear all acceptedMediaTypes.config()Configuration used to configure this instance.Deprecated.Update builder from configuration (node of this type).Content type to use if not configured (in response headers for server, and in request headers for client).contentType(HttpMediaType contentType) Content type to use if not configured (in response headers for server, and in request headers for client).contentType(Consumer<HttpMediaType.Builder> consumer) Content type to use if not configured (in response headers for server, and in request headers for client).contentType(Supplier<? extends HttpMediaType> supplier) Content type to use if not configured (in response headers for server, and in request headers for client).from(MediaSupportConfig prototype) Update this builder from an existing prototype instance.from(MediaSupportConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.name()Name of the support.Name of the support.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 MediaSupportConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends MediaSupportConfig> - 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 MediaSupportConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends MediaSupportConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
name
Name of the support. Each extension should provide its own default. This is to enable multiple instance of the same type.- Parameters:
name- name of the support- Returns:
- updated builder instance
- See Also:
-
clearAcceptedMediaTypes
Clear all acceptedMediaTypes.- Returns:
- updated builder instance
- See Also:
-
acceptedMediaTypes
Types accepted by this media support. When server processes the response, it checks theAcceptheader, to choose the right media support, if there are more supports available for the provided entity object.NOTE Make sure that you accept the type returned by
contentType().- Parameters:
acceptedMediaTypes- accepted media types- Returns:
- updated builder instance
- See Also:
-
addAcceptedMediaTypes
Types accepted by this media support. When server processes the response, it checks theAcceptheader, to choose the right media support, if there are more supports available for the provided entity object.NOTE Make sure that you accept the type returned by
contentType().- Parameters:
acceptedMediaTypes- accepted media types- Returns:
- updated builder instance
- See Also:
-
addAcceptedMediaType
Types accepted by this media support. When server processes the response, it checks theAcceptheader, to choose the right media support, if there are more supports available for the provided entity object.NOTE Make sure that you accept the type returned by
contentType().- Parameters:
acceptedMediaType- add single accepted media types- Returns:
- updated builder instance
- See Also:
-
contentType
Content type to use if not configured (in response headers for server, and in request headers for client).- Parameters:
contentType- content type to use- Returns:
- updated builder instance
- See Also:
-
contentType
Content type to use if not configured (in response headers for server, and in request headers for client).- Parameters:
consumer- consumer of builder of content type to use- Returns:
- updated builder instance
- See Also:
-
contentType
Content type to use if not configured (in response headers for server, and in request headers for client).- Parameters:
supplier- supplier of content type to use- Returns:
- updated builder instance
- See Also:
-
name
Name of the support. Each extension should provide its own default. This is to enable multiple instance of the same type.- Returns:
- name of the support
-
acceptedMediaTypes
Types accepted by this media support. When server processes the response, it checks theAcceptheader, to choose the right media support, if there are more supports available for the provided entity object.NOTE Make sure that you accept the type returned by
contentType().- Returns:
- accepted media types
-
contentType
Content type to use if not configured (in response headers for server, and in request headers for client).- Returns:
- content type to use
-
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)