Package io.micronaut.jms.serdes
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 Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
deserialize
(javax.jms.Message message, Class<T> clazz) Extract the body of the message into the specified type.javax.jms.Message
Create a message from the body.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.jms.serdes.Deserializer
deserialize
-
Constructor Details
-
DefaultSerializerDeserializer
public DefaultSerializerDeserializer(io.micronaut.context.BeanLocator beanLocator)
-
-
Method Details
-
deserialize
Description copied from interface:Deserializer
Extract the body of the message into the specified type.- Specified by:
deserialize
in interfaceDeserializer
- Type Parameters:
T
- the type- Parameters:
message
- the messageclazz
- the type- Returns:
- the extracted message body as an instance of the specified type
-
serialize
Description copied from interface:Serializer
Create a message from the body.- Specified by:
serialize
in interfaceSerializer
- Parameters:
session
- the JMS sessionbody
- the message body- Returns:
- the message
-