java.lang.Object
io.helidon.http.media.jsonb.JsonbSupport
- All Implemented Interfaces:
RuntimeType.Api<JsonbSupportConfig>
,NamedService
,MediaSupport
public class JsonbSupport
extends Object
implements MediaSupport, RuntimeType.Api<JsonbSupportConfig>
ServiceLoader
provider implementation for JSON Binding media support.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.http.media.MediaSupport
MediaSupport.ReaderResponse<T>, MediaSupport.SupportLevel, MediaSupport.WriterResponse<T>
-
Method Summary
Modifier and TypeMethodDescriptionstatic JsonbSupportConfig.Builder
builder()
Creates a new builder.static MediaSupport
create()
Creates a newJsonbSupport
.static MediaSupport
Creates a newJsonbSupport
.static MediaSupport
Creates a newJsonbSupport
.static JsonbSupport
create
(JsonbSupportConfig jsonbSupportConfig) Creates a newJsonbSupport
based on theJsonbSupportConfig
.static MediaSupport
Creates a newJsonbSupport
.static JsonbSupport
create
(Consumer<JsonbSupportConfig.Builder> consumer) Creates a new customizedJsonbSupport
.name()
Name of this implementation, as provided inConfiguredProvider.create(Config, String)
.The prototype as it was received when creating this runtime object instance.<T> MediaSupport.ReaderResponse
<T> reader
(GenericType<T> type, Headers requestHeaders) Reader for an entity.<T> MediaSupport.ReaderResponse
<T> reader
(GenericType<T> type, Headers requestHeaders, Headers responseHeaders) Client response reader.type()
Type of this implementation, to distinguish instances of same type, with differentNamedService.name()
.<T> MediaSupport.WriterResponse
<T> writer
(GenericType<T> type, Headers requestHeaders, WritableHeaders<?> responseHeaders) Server response writer.<T> MediaSupport.WriterResponse
<T> writer
(GenericType<T> type, WritableHeaders<?> requestHeaders) Client request writer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.http.media.MediaSupport
init
-
Method Details
-
create
Creates a newJsonbSupport
.- Returns:
- a new
JsonbSupport
-
create
Creates a newJsonbSupport
.- Parameters:
config
- must not benull
- Returns:
- a new
JsonbSupport
-
create
Creates a newJsonbSupport
.- Parameters:
config
- must not benull
name
- name of this instance- Returns:
- a new
JsonbSupport
- See Also:
-
create
Creates a newJsonbSupport
.- Parameters:
jsonb
- jsonb instance- Returns:
- a new instance
-
create
Creates a newJsonbSupport
based on theJsonbSupportConfig
.- Parameters:
jsonbSupportConfig
- must not benull
- Returns:
- a new
JsonbSupport
-
create
Creates a new customizedJsonbSupport
.- Parameters:
consumer
- config builder consumer- Returns:
- a new
JsonbSupport
-
builder
Creates a new builder.- Returns:
- a new builder instance
-
name
Description copied from interface:NamedService
Name of this implementation, as provided inConfiguredProvider.create(Config, String)
.- Specified by:
name
in interfaceNamedService
- Returns:
- name of this service
-
type
Description copied from interface:NamedService
Type of this implementation, to distinguish instances of same type, with differentNamedService.name()
. Use for exampleConfiguredProvider.configKey()
to define the type.- Specified by:
type
in interfaceNamedService
- Returns:
- type of this service
-
reader
Description copied from interface:MediaSupport
Reader for an entity.- Specified by:
reader
in interfaceMediaSupport
- Type Parameters:
T
- type- Parameters:
type
- type of entityrequestHeaders
- headers belonging to this entity (such as server request headers), expected to have content type- Returns:
- reader response, whether this type is supported or not
-
writer
public <T> MediaSupport.WriterResponse<T> writer(GenericType<T> type, Headers requestHeaders, WritableHeaders<?> responseHeaders) Description copied from interface:MediaSupport
Server response writer.- Specified by:
writer
in interfaceMediaSupport
- Type Parameters:
T
- type- Parameters:
type
- type of entityrequestHeaders
- request headersresponseHeaders
- response headers- Returns:
- writer response, whether this type is supported or not
-
reader
public <T> MediaSupport.ReaderResponse<T> reader(GenericType<T> type, Headers requestHeaders, Headers responseHeaders) Description copied from interface:MediaSupport
Client response reader.- Specified by:
reader
in interfaceMediaSupport
- Type Parameters:
T
- type- Parameters:
type
- type of entityrequestHeaders
- request headersresponseHeaders
- response headers- Returns:
- reader response, whether this type is supported or not
-
writer
public <T> MediaSupport.WriterResponse<T> writer(GenericType<T> type, WritableHeaders<?> requestHeaders) Description copied from interface:MediaSupport
Client request writer.- Specified by:
writer
in interfaceMediaSupport
- Type Parameters:
T
- type- Parameters:
type
- type of entityrequestHeaders
- request headers- Returns:
- writer response, whether this type is supported or not
-
prototype
Description copied from interface:RuntimeType.Api
The prototype as it was received when creating this runtime object instance.- Specified by:
prototype
in interfaceRuntimeType.Api<JsonbSupportConfig>
- Returns:
- prototype object used to create this instance
-