| Constructor and Description |
|---|
JsonDecoder(java.lang.Class<T> eventType) |
| Modifier and Type | Method and Description |
|---|---|
T |
decode(byte[] bytes)
Decode the given bytes into an message object of type M.
|
boolean |
willDecode(java.lang.String contentType)
Answer whether the given content type can be decoded into an object of type T.
|
public JsonDecoder(java.lang.Class<T> eventType)
public T decode(byte[] bytes) throws DecodeException
Decoderdecode in interface Decoder<T>bytes - the bytes to be decoded.DecodeException - if the message decoding failspublic boolean willDecode(java.lang.String contentType)
DecoderwillDecode in interface Decoder<T>contentType - the content type to be decoded.