Class TextMessageTranslator

java.lang.Object
de.otto.synapse.translator.TextMessageTranslator
All Implemented Interfaces:
MessageTranslator<TextMessage>, Function<Message<?>,TextMessage>

public class TextMessageTranslator extends Object implements MessageTranslator<TextMessage>
A MessageTranslator that converts messages into TextMessage.

The Message Translator is the messaging equivalent of the Adapter pattern described in [GoF]. An adapter converts the interface of a component into a another interface so it can be used in a different context.

MessageTranslator

This implementation is relying on ObjectMappers.currentObjectMapper() to transform message payloads with non-String payload into a JSON payload.

  • Constructor Details

    • TextMessageTranslator

      public TextMessageTranslator()
  • Method Details