MarshallerService
Supports marshaling and unmarshaling of the generic type T for a set of mime types.
API
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) .
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:
-
GridMarshallerService parameterizes on Grid
The Core Metamodel module provides an implementation, GridMarshallerServiceBootstrap.
-
MenuBarsMarshallerService parameterizes on MenuBars.
The Core Runtime Services module provides an implementation, MenuBarsServiceBootstrap.