- All Superinterfaces:
org.refcodes.factory.MarshalFactory<String>
,org.refcodes.factory.MarshalFactory.MarshalFactoryComplement<InputStream>
,org.refcodes.factory.MarshalFactory.MarshalFactoryComposite<String,
,InputStream> MediaTypesAccessor
,org.refcodes.factory.UnmarshalFactory<String>
,org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
,org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComposite<String,
InputStream>
- All Known Implementing Classes:
FormMediaTypeFactory
,HtmlMediaTypeFactory
,JsonMediaTypeFactory
,TextMediaTypeFactory
,XmlMediaTypeFactory
,YamlMediaTypeFactory
public interface MediaTypeFactory
extends org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComposite<String,InputStream>, org.refcodes.factory.MarshalFactory.MarshalFactoryComposite<String,InputStream>, MediaTypesAccessor
The
MediaTypeFactory
creates instances from an HTTP body and creates
an HTTP body from given instances according to the MediaType
(as of
MediaTypesAccessor.getMediaTypes()
) for which the MediaTypeFactory
is
responsible.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.factory.MarshalFactory
org.refcodes.factory.MarshalFactory.MarshalFactoryComplement<C extends Object>, org.refcodes.factory.MarshalFactory.MarshalFactoryComposite<T extends Object,
C extends Object> Nested classes/interfaces inherited from interface org.refcodes.web.MediaTypesAccessor
MediaTypesAccessor.MediaTypesBuilder<B extends MediaTypesAccessor.MediaTypesBuilder<B>>, MediaTypesAccessor.MediaTypesMutator, MediaTypesAccessor.MediaTypesProperty
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault 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) default <SRC> InputStream
fromUnmarshaled
(SRC aContext) default <SRC> InputStream
fromUnmarshaled
(SRC aContext, Map<String, String> aProperties) Methods inherited from interface org.refcodes.factory.MarshalFactory
toMarshaled, toMarshaled
Methods inherited from interface org.refcodes.web.MediaTypesAccessor
getMediaTypes
Methods inherited from interface org.refcodes.factory.UnmarshalFactory
toUnmarshaled, toUnmarshaled, toUnmarshaled, toUnmarshaled
-
Field Details
-
VALUE_SELECTOR
- See Also:
-
ARRAY_SELECTOR
- See Also:
-
COLLECTION_SELECTOR
- See Also:
-
TYPE_ANNOTATION
-
-
Method Details
-
fromMarshaled
default <T> T fromMarshaled(InputStream aContentInputStream, Class<T> aType) throws org.refcodes.exception.UnmarshalException - Specified by:
fromMarshaled
in interfaceorg.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
- Throws:
org.refcodes.exception.UnmarshalException
-
fromMarshaled
default Object fromMarshaled(InputStream aContentInputStream, Class<?>... aTypes) throws org.refcodes.exception.UnmarshalException - Specified by:
fromMarshaled
in interfaceorg.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
- Throws:
org.refcodes.exception.UnmarshalException
-
fromMarshaled
default Object fromMarshaled(InputStream aContentInputStream, Map<String, String> aProperties, Class<?>... aTypes) throws org.refcodes.exception.UnmarshalException- Specified by:
fromMarshaled
in interfaceorg.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
- Throws:
org.refcodes.exception.UnmarshalException
-
fromMarshaled
default <T> T fromMarshaled(InputStream aContentInputStream, Class<T> aType, Map<String, String> aProperties) throws org.refcodes.exception.UnmarshalException- Specified by:
fromMarshaled
in interfaceorg.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<InputStream>
- Throws:
org.refcodes.exception.UnmarshalException
-
fromUnmarshaled
default <SRC> InputStream fromUnmarshaled(SRC aContext) throws org.refcodes.exception.MarshalException - Specified by:
fromUnmarshaled
in interfaceorg.refcodes.factory.MarshalFactory.MarshalFactoryComplement<InputStream>
- Throws:
org.refcodes.exception.MarshalException
-
fromUnmarshaled
default <SRC> InputStream fromUnmarshaled(SRC aContext, Map<String, String> aProperties) throws org.refcodes.exception.MarshalException- Specified by:
fromUnmarshaled
in interfaceorg.refcodes.factory.MarshalFactory.MarshalFactoryComplement<InputStream>
- Throws:
org.refcodes.exception.MarshalException
-