Class PathSupport
java.lang.Object
io.helidon.http.media.PathSupport
- All Implemented Interfaces:
NamedService, MediaSupport
Media support for Path.
This needs to be a proper media support, as encoding should be provided when sending strings,
and should be honored when parsing them.
-
Nested Class Summary
Nested classes/interfaces inherited from interface MediaSupport
MediaSupport.ReaderResponse<T>, MediaSupport.SupportLevel, MediaSupport.WriterResponse<T>Modifier and TypeInterfaceDescriptionstatic final recordReader response.static enumHow does this provider support the entity type.static final recordWriter response. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MediaSupportcreate()Create a new media support for writingPath.name()Name of this implementation, as provided inConfiguredProvider.create(Config, String).<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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MediaSupport
initModifier and TypeMethodDescriptiondefault voidinit(MediaContext context) Once all providers are discovered/configured and context is established, theMediaContextcalls this method on all providers to allow sub-resolution of readers and writers.
-
Constructor Details
-
PathSupport
Create a named instance.- Parameters:
name- name of this instance
-
-
Method Details
-
create
Create a new media support for writingPath.- Returns:
- a new media support
-
name
Description copied from interface:NamedServiceName of this implementation, as provided inConfiguredProvider.create(Config, String).- Specified by:
namein interfaceNamedService- Returns:
- name of this service
-
type
Description copied from interface:NamedServiceType of this implementation, to distinguish instances of same type, with differentNamedService.name(). Use for exampleConfiguredProvider.configKey()to define the type.- Specified by:
typein interfaceNamedService- Returns:
- type of this service
-
reader
Description copied from interface:MediaSupportReader for an entity.- Specified by:
readerin 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:MediaSupportServer response writer.- Specified by:
writerin 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:MediaSupportClient response reader.- Specified by:
readerin 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:MediaSupportClient request writer.- Specified by:
writerin interfaceMediaSupport- Type Parameters:
T- type- Parameters:
type- type of entityrequestHeaders- request headers- Returns:
- writer response, whether this type is supported or not
-