T - The type to be serialized/deserializedpublic interface MqttPayloadSerDes<T>
extends io.micronaut.core.order.Ordered
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(byte[] payload,
io.micronaut.core.type.Argument<T> argument)
Deserializes the message into the requested type.
|
byte[] |
serialize(T data)
Serializes the data into a byte[] to be published
to MQTT.
|
boolean |
supports(io.micronaut.core.type.Argument<T> type)
Determines if this serdes supports the given type.
|
@Nullable T deserialize(byte[] payload, io.micronaut.core.type.Argument<T> argument)
payload - The message to deserializeargument - The type to be returned@Nullable
byte[] serialize(@Nullable
T data)
data - The data to serializeboolean supports(io.micronaut.core.type.Argument<T> type)
type - The type