Package org.refcodes.net
Class TextMediaTypeFactory
- java.lang.Object
-
- org.refcodes.net.TextMediaTypeFactory
-
- All Implemented Interfaces:
org.refcodes.factory.MarshalFactory<java.lang.String>
,org.refcodes.factory.MarshalFactory.MarshalFactoryComplement<java.lang.String>
,org.refcodes.factory.MarshalFactory.MarshalFactoryComposite<java.lang.String,java.io.InputStream>
,org.refcodes.factory.UnmarshalFactory<java.lang.String>
,org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<java.lang.String>
,org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComposite<java.lang.String,java.io.InputStream>
,MediaTypeFactory
,MediaTypesAccessor
public class TextMediaTypeFactory extends java.lang.Object implements MediaTypeFactory
Implements theMediaTypeFactory
for Media-Type "text/plain" (MediaType.TEXT_PLAIN
).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.factory.MarshalFactory
org.refcodes.factory.MarshalFactory.MarshalFactoryComplement<C extends java.lang.Object>, org.refcodes.factory.MarshalFactory.MarshalFactoryComposite<T extends java.lang.Object,C extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.refcodes.net.MediaTypesAccessor
MediaTypesAccessor.MediaTypesBuilder<B extends MediaTypesAccessor.MediaTypesBuilder<B>>, MediaTypesAccessor.MediaTypesMutator, MediaTypesAccessor.MediaTypesProperty
-
Nested classes/interfaces inherited from interface org.refcodes.factory.UnmarshalFactory
org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComplement<C extends java.lang.Object>, org.refcodes.factory.UnmarshalFactory.UnmarshalFactoryComposite<T extends java.lang.Object,C extends java.lang.Object>
-
-
Constructor Summary
Constructors Constructor Description TextMediaTypeFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaType[]
getMediaTypes()
Retrieves the Media-Types from the Media-Types property.java.lang.String
toMarshaled(java.lang.Object aObject)
<T> T
toUnmarshaled(java.lang.String aHttpBody, java.lang.Class<T> aType)
To unmarshaled.-
Methods inherited from interface org.refcodes.net.MediaTypeFactory
fromMarshaled, fromMarshaled, fromMarshaled, fromMarshaled, fromUnmarshaled, fromUnmarshaled
-
-
-
-
Method Detail
-
getMediaTypes
public MediaType[] getMediaTypes()
Retrieves the Media-Types from the Media-Types property.- Specified by:
getMediaTypes
in interfaceMediaTypesAccessor
- Returns:
- The Media-Types stored by the Media-Types property.
-
toMarshaled
public java.lang.String toMarshaled(java.lang.Object aObject) throws org.refcodes.exception.MarshalException
- Specified by:
toMarshaled
in interfaceorg.refcodes.factory.MarshalFactory<java.lang.String>
- Throws:
org.refcodes.exception.MarshalException
-
toUnmarshaled
public <T> T toUnmarshaled(java.lang.String aHttpBody, java.lang.Class<T> aType) throws org.refcodes.exception.UnmarshalException
To unmarshaled.- Specified by:
toUnmarshaled
in interfaceorg.refcodes.factory.UnmarshalFactory<java.lang.String>
- Type Parameters:
T
- the generic type- Parameters:
aHttpBody
- the http bodyaType
- the type- Returns:
- the t
- Throws:
org.refcodes.exception.UnmarshalException
- the unmarshal exception
-
-