T - The type to be serialized/deserializedpublic interface NatsMessageSerDes<T>
extends io.micronaut.core.order.Ordered
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(io.nats.client.Message message,
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 nats.
|
boolean |
supports(io.micronaut.core.type.Argument<T> type)
Determines if this serdes supports the given type.
|
@Nullable T deserialize(io.nats.client.Message message, io.micronaut.core.type.Argument<T> argument)
message - 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