- All Superinterfaces:
NamedService
- All Known Implementing Classes:
FormParamsSupport
,JacksonSupport
,JsonbSupport
,JsonpSupport
,MultiPartSupport
,PathSupport
,StringSupport
Media support to be registered with
MediaContext
.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final record
Reader response.static enum
How does this provider support the entity type.static final record
Writer response. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
init
(MediaContext context) Once all providers are discovered/configured and context is established, theMediaContext
calls this method on all providers to allow sub-resolution of readers and writers.default <T> MediaSupport.ReaderResponse
<T> reader
(GenericType<T> type, Headers headers) Reader for an entity.default <T> MediaSupport.ReaderResponse
<T> reader
(GenericType<T> type, Headers requestHeaders, Headers responseHeaders) Client response reader.default <T> MediaSupport.WriterResponse
<T> writer
(GenericType<T> type, Headers requestHeaders, WritableHeaders<?> responseHeaders) Server response writer.default <T> MediaSupport.WriterResponse
<T> writer
(GenericType<T> type, WritableHeaders<?> requestHeaders) Client request writer.Methods inherited from interface io.helidon.common.config.NamedService
name, type
-
Method Details
-
init
Once all providers are discovered/configured and context is established, theMediaContext
calls this method on all providers to allow sub-resolution of readers and writers.- Parameters:
context
- media context context
-
reader
Reader for an entity.- Type Parameters:
T
- type- Parameters:
type
- type of entityheaders
- 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
default <T> MediaSupport.WriterResponse<T> writer(GenericType<T> type, Headers requestHeaders, WritableHeaders<?> responseHeaders) Server response writer.- Type Parameters:
T
- type- Parameters:
type
- type of entityrequestHeaders
- request headersresponseHeaders
- response headers- Returns:
- writer response, whether this type is supported or not
-
reader
default <T> MediaSupport.ReaderResponse<T> reader(GenericType<T> type, Headers requestHeaders, Headers responseHeaders) Client response reader.- Type Parameters:
T
- type- Parameters:
type
- type of entityrequestHeaders
- request headersresponseHeaders
- response headers- Returns:
- reader response, whether this type is supported or not
-
writer
default <T> MediaSupport.WriterResponse<T> writer(GenericType<T> type, WritableHeaders<?> requestHeaders) Client request writer.- Type Parameters:
T
- type- Parameters:
type
- type of entityrequestHeaders
- request headers- Returns:
- writer response, whether this type is supported or not
-