public interface MediaTypeFactory extends Unmarshalable<String>, Marshalable<String>, MediaTypeAccessor
MediaTypeFactory
creates instances from an HTTP body and creates
an HTTP body from given instances according to the MediaType
(as of
MediaTypeAccessor.getMediaType()
) for which the MediaTypeFactory
is
responsible.MediaTypeAccessor.MediaTypeBuilder<B extends MediaTypeAccessor.MediaTypeBuilder<B>>, MediaTypeAccessor.MediaTypeMutator, MediaTypeAccessor.MediaTypeProperty
Modifier and Type | Method and Description |
---|---|
default Object |
fromMarshaled(InputStream aContentInputStream,
Class<?>... aTypes)
|
default <T> T |
fromMarshaled(InputStream aContentInputStream,
Class<T> aType)
|
default <T> T |
fromMarshaled(InputStream aContentInputStream,
Class<T> aType,
Map<String,String> aProperties)
|
default Object |
fromMarshaled(InputStream aContentInputStream,
Map<String,String> aProperties,
Class<?>... aTypes)
Same as
Unmarshalable.toUnmarshaled(Object, Map, Class...) passing an
InputStream instead of a String . |
default <SRC> InputStream |
fromUnmarshaled(SRC aContext)
|
default <SRC> InputStream |
fromUnmarshaled(SRC aContext,
Map<String,String> aProperties)
|
toUnmarshaled, toUnmarshaled, toUnmarshaled, toUnmarshaled
toMarshaled, toMarshaled
getMediaType
default <T> T fromMarshaled(InputStream aContentInputStream, Class<T> aType) throws org.refcodes.exception.UnmarshalException
T
- the generic typeaContentInputStream
- the a content input streamaType
- The type identifying the instance to be created / retrieved.org.refcodes.exception.UnmarshalException
- the unmarshal exceptiondefault Object fromMarshaled(InputStream aContentInputStream, Class<?>... aTypes) throws org.refcodes.exception.UnmarshalException
aContentInputStream
- the a content input streamaTypes
- The types identifying or included by the instance to be
created / retrieved.org.refcodes.exception.UnmarshalException
- the unmarshal exceptiondefault Object fromMarshaled(InputStream aContentInputStream, Map<String,String> aProperties, Class<?>... aTypes) throws org.refcodes.exception.UnmarshalException
Unmarshalable.toUnmarshaled(Object, Map, Class...)
passing an
InputStream
instead of a String
.aContentInputStream
- the a content input streamaProperties
- the a propertiesaTypes
- The types identifying or included by the instance to be
created / retrieved.org.refcodes.exception.UnmarshalException
- the unmarshal exceptiondefault <T> T fromMarshaled(InputStream aContentInputStream, Class<T> aType, Map<String,String> aProperties) throws org.refcodes.exception.UnmarshalException
T
- the generic typeaContentInputStream
- the a content input streamaType
- The type identifying the instance to be created / retrieved.aProperties
- the a propertiesorg.refcodes.exception.UnmarshalException
- the unmarshal exceptiondefault <SRC> InputStream fromUnmarshaled(SRC aContext) throws org.refcodes.exception.MarshalException
SRC
- the generic typeaContext
- the a contextorg.refcodes.exception.MarshalException
- the marshal exceptiondefault <SRC> InputStream fromUnmarshaled(SRC aContext, Map<String,String> aProperties) throws org.refcodes.exception.MarshalException
SRC
- the generic typeaContext
- the a contextaProperties
- the a propertiesorg.refcodes.exception.MarshalException
- the marshal exceptionCopyright © 2017. All rights reserved.