Marshalable<String>
, MediaTypeAccessor
, MediaTypeFactory
, Unmarshalable<String>
public class TextPlainFactory extends Object implements MediaTypeFactory
MediaTypeFactory
for Media-Type "text/plain" (
MediaType.TEXT_PLAIN
).MediaTypeAccessor.MediaTypeBuilder<B extends MediaTypeAccessor.MediaTypeBuilder<B>>, MediaTypeAccessor.MediaTypeMutator, MediaTypeAccessor.MediaTypeProperty
Constructor | Description |
---|---|
TextPlainFactory() |
Modifier and Type | Method | Description |
---|---|---|
MediaType |
getMediaType() |
Retrieves the Media-Type from the Media-Type property.
|
String |
toMarshaled(Object aObject) |
This method creates / retrieves an instance of the given type with the
given identifier (name) constructed as defined in one to many
configuration files.
|
<T> T |
toUnmarshaled(String aHttpBody,
Class<T> aType) |
To unmarshaled.
|
toMarshaled
fromMarshaled, fromMarshaled, fromMarshaled, fromMarshaled, fromUnmarshaled, fromUnmarshaled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toUnmarshaled, toUnmarshaled, toUnmarshaled
public MediaType getMediaType()
getMediaType
in interface MediaTypeAccessor
public String toMarshaled(Object aObject) throws org.refcodes.exception.MarshalException
toMarshaled
in interface Marshalable<String>
aObject
- The context which may influence the object being created
by this factory.org.refcodes.exception.MarshalException
- Thrown when marshaling / serializing an object
fails.public <T> T toUnmarshaled(String aHttpBody, Class<T> aType) throws org.refcodes.exception.UnmarshalException
toUnmarshaled
in interface Unmarshalable<String>
T
- the generic typeaHttpBody
- the http bodyaType
- the typeorg.refcodes.exception.UnmarshalException
- the unmarshal exceptionCopyright © 2018. All rights reserved.