Package de.otto.synapse.translator
Interface MessageTranslator<P extends Message<?>>
-
- Type Parameters:
P- The type of the translated message's payload
- All Superinterfaces:
java.util.function.Function<Message<?>,P>
- 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 java.util.function.Function<Message<?>,P>
Translates anyMessage<?>into aMessagewith 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:
- EIP: Message Translator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Papply(Message<?> message)Translates a Message into a Message with payload-type <P>
-