Package io.helidon.http.media.multipart
Class MultiPartSupport
java.lang.Object
io.helidon.http.media.multipart.MultiPartSupport
- All Implemented Interfaces:
- NamedService,- MediaSupport
Media support implementation for support of multipart.
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.helidon.http.media.MediaSupportMediaSupport.ReaderResponse<T>, MediaSupport.SupportLevel, MediaSupport.WriterResponse<T>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe default boundary used for encoding multipart messages.
- 
Method SummaryModifier and TypeMethodDescriptionstatic MediaSupportCreates a newMultiPartSupport.static MediaSupportCreates a new namedMultiPartSupport.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.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.
- 
Field Details- 
DEFAULT_BOUNDARYThe default boundary used for encoding multipart messages.- See Also:
 
 
- 
- 
Method Details- 
createCreates a newMultiPartSupport.- Parameters:
- config- must not be- null
- Returns:
- a new MultiPartSupport
 
- 
createCreates a new namedMultiPartSupport.- Parameters:
- config- must not be- null
- name- name of the multi-part support
- Returns:
- a new MultiPartSupport
 
- 
nameDescription copied from interface:NamedServiceName of this implementation, as provided inConfiguredProvider.create(Config, String).- Specified by:
- namein interface- NamedService
- Returns:
- name of this service
 
- 
typeDescription 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 interface- NamedService
- Returns:
- type of this service
 
- 
initDescription copied from interface:MediaSupportOnce all providers are discovered/configured and context is established, theMediaContextcalls this method on all providers to allow sub-resolution of readers and writers.- Specified by:
- initin interface- MediaSupport
- Parameters:
- context- media context context
 
- 
readerDescription copied from interface:MediaSupportReader for an entity.- Specified by:
- readerin interface- MediaSupport
- Type Parameters:
- T- type
- Parameters:
- type- type of entity
- requestHeaders- 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
 
- 
writerpublic <T> MediaSupport.WriterResponse<T> writer(GenericType<T> type, Headers requestHeaders, WritableHeaders<?> responseHeaders) Description copied from interface:MediaSupportServer response writer.- Specified by:
- writerin interface- MediaSupport
- Type Parameters:
- T- type
- Parameters:
- type- type of entity
- requestHeaders- request headers
- responseHeaders- response headers
- Returns:
- writer response, whether this type is supported or not
 
- 
readerpublic <T> MediaSupport.ReaderResponse<T> reader(GenericType<T> type, Headers requestHeaders, Headers responseHeaders) Description copied from interface:MediaSupportClient response reader.- Specified by:
- readerin interface- MediaSupport
- Type Parameters:
- T- type
- Parameters:
- type- type of entity
- requestHeaders- request headers
- responseHeaders- response headers
- Returns:
- reader response, whether this type is supported or not
 
- 
writerpublic <T> MediaSupport.WriterResponse<T> writer(GenericType<T> type, WritableHeaders<?> requestHeaders) Description copied from interface:MediaSupportClient request writer.- Specified by:
- writerin interface- MediaSupport
- Type Parameters:
- T- type
- Parameters:
- type- type of entity
- requestHeaders- request headers
- Returns:
- writer response, whether this type is supported or not
 
 
-