Class JsonDeserializer

java.lang.Object
overit.geocall.event.consumer.JsonDeserializer
All Implemented Interfaces:
MessageDeserializer<Object>

@Service public class JsonDeserializer extends Object implements MessageDeserializer<Object>
Deserializer for specific JSON message objects
  • Constructor Details

    • JsonDeserializer

      public JsonDeserializer(JackMapper mapper)
  • Method Details

    • deserialize

      public Object deserialize(String messageSerialized, Class classMessage) throws SpinException
      Description copied from interface: MessageDeserializer
      Deserialize the body of the message with the type passed as a parameter
      Specified by:
      deserialize in interface MessageDeserializer<Object>
      Parameters:
      messageSerialized - body of the message serialized as string
      classMessage - class of the message that will be returned after deserialization
      Returns:
      the object of the message deserialized
      Throws:
      SpinException - if an exception is thrown during the deserialization