T - Message typepublic interface Encoder<T>
The Encoder is responsible to convert a message object of the given type to a raw bytes message.
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
contentType()
Content type of converter.
|
byte[] |
encode(T object)
Encode a message object of type T into given bytes.
|
byte[] encode(T object) throws EncodeException
Encode a message object of type T into given bytes.
EncodeException - If the conversion failsjava.lang.String contentType()
Content type of converter.
<h4>Example:</h4>
application/json
null