Package de.otto.synapse.translator
Interface MessageTranslator<P extends Message<?>>
- Type Parameters:
P- The type of the translated message's payload
- All Known Implementing Classes:
TextMessageTranslator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface MessageTranslator<P extends Message<?>>
extends Function<Message<?>,P>
Translates any
Message<?> into a Message with payload-type P by translating
the message's payload into the specified target-type payload.
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.
- See Also:
-
Method Summary