MarshallerService

Supports marshaling and unmarshaling of the generic type T for a set of mime types.

API

MarshallerService.java
interface MarshallerService<T> {
  Class<T> supportedClass()
  EnumSet<CommonMimeType> supportedFormats()     (1)
  String marshal(T value, CommonMimeType format)     (2)
  Try<T> unmarshal(String content, CommonMimeType format)     (3)
}
1 supportedFormats()

Supported format(s) for #unmarshal(String, CommonMimeType) and #marshal(Object, CommonMimeType) .

2 marshal(T, CommonMimeType)
3 unmarshal(String, CommonMimeType)

Returns a new de-serialized instance wrapped in a Try .

Members

supportedFormats()

Supported format(s) for #unmarshal(String, CommonMimeType) and #marshal(Object, CommonMimeType) .

marshal(T, CommonMimeType)

unmarshal(String, CommonMimeType)

Returns a new de-serialized instance wrapped in a Try .

Implementation

This interface is extended by two subinterfaces, each of which have implementations provided by the framework: