Class MessageSerializer

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable

    public class MessageSerializer
    extends com.fasterxml.jackson.databind.JsonSerializer<Message>
    Serializes Message objects by marshalling all attributes of Message objects (i.e. key, severity, inserts, and properties), as well as the appropriately populated summary and detail message content in order to prevent clients, which may reside in different application tiers, from having to determine the actual message text from the Message object attributes.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

        com.fasterxml.jackson.databind.JsonSerializer.None
    • Constructor Detail

      • MessageSerializer

        public MessageSerializer()
    • Method Detail

      • handledType

        public Class<Message> handledType()
        Overrides:
        handledType in class com.fasterxml.jackson.databind.JsonSerializer<Message>
      • serialize

        public void serialize​(Message message,
                              com.fasterxml.jackson.core.JsonGenerator jgen,
                              com.fasterxml.jackson.databind.SerializerProvider provider)
                       throws IOException
        Specified by:
        serialize in class com.fasterxml.jackson.databind.JsonSerializer<Message>
        Throws:
        IOException