Package io.micronaut.rabbitmq.serdes
Interface RabbitMessageSerDes<T>
- Type Parameters:
- T- The type to be serialized/deserialized
- All Superinterfaces:
- io.micronaut.core.order.Ordered
- All Known Implementing Classes:
- JavaLangRabbitMessageSerDes,- JsonRabbitMessageSerDes
public interface RabbitMessageSerDes<T>
extends io.micronaut.core.order.Ordered
Responsible for serializing and deserializing RabbitMQ message bodies.
- Since:
- 1.1.0
- Author:
- James Kleeh
- 
Field SummaryFields inherited from interface io.micronaut.core.order.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Method SummaryModifier and TypeMethodDescriptiondeserialize(RabbitConsumerState consumerState, io.micronaut.core.type.Argument<T> argument) Deserializes the message into the requested type.@io.micronaut.core.annotation.Nullable byte[]serialize(T data, MutableBasicProperties properties) Serializes the data into a byte[] to be published to RabbitMQ.booleanDetermines if this serdes supports the given type.Methods inherited from interface io.micronaut.core.order.OrderedgetOrder
- 
Method Details- 
deserialize@Nullable T deserialize(RabbitConsumerState consumerState, io.micronaut.core.type.Argument<T> argument) Deserializes the message into the requested type.- Parameters:
- consumerState- The message to deserialize
- argument- The type to be returned
- Returns:
- The deserialized body
 
- 
serialize@Nullable @io.micronaut.core.annotation.Nullable byte[] serialize(@Nullable T data, MutableBasicProperties properties) Serializes the data into a byte[] to be published to RabbitMQ.- Parameters:
- data- The data to serialize
- properties- The properties of the message
- Returns:
- The message body
 
- 
supportsDetermines if this serdes supports the given type.- Parameters:
- type- The type
- Returns:
- True if the type is supported
 
 
-