Class DefaultSerializerDeserializer

java.lang.Object
io.micronaut.jms.serdes.DefaultSerializerDeserializer
All Implemented Interfaces:
Deserializer, Serializer

@Singleton public final class DefaultSerializerDeserializer extends Object implements Serializer, Deserializer
Default implementation of Serializer and Deserializer.
Since:
1.0.0
Author:
Elliott Pope
  • Constructor Details

    • DefaultSerializerDeserializer

      public DefaultSerializerDeserializer(io.micronaut.context.BeanLocator beanLocator)
  • Method Details

    • deserialize

      public <T> T deserialize(jakarta.jms.Message message, Class<T> clazz)
      Description copied from interface: Deserializer
      Extract the body of the message into the specified type.
      Specified by:
      deserialize in interface Deserializer
      Type Parameters:
      T - the type
      Parameters:
      message - the message
      clazz - the type
      Returns:
      the extracted message body as an instance of the specified type
    • serialize

      public jakarta.jms.Message serialize(jakarta.jms.Session session, Object body)
      Description copied from interface: Serializer
      Create a message from the body.
      Specified by:
      serialize in interface Serializer
      Parameters:
      session - the JMS session
      body - the message body
      Returns:
      the message