public class MessageMapper<M extends Message,N extends Message> extends SingleSender<N> implements MessageReceiver<M>
Modifier and Type | Field and Description |
---|---|
protected Function<? super M,? extends N> |
fun |
receiver
Constructor and Description |
---|
MessageMapper(Function<? super M,? extends N> fun)
Factory method which creates a MessageMapper which will apply the
specified function to each received message.x1
|
Modifier and Type | Method and Description |
---|---|
static <M extends Message,N extends Message> |
lift(Function<M,? extends N> f)
Delivers a function to apply on a message receiver for type "N"
to get a message receiver for type "M", when a function is given
which maps the messages the other way round.
|
void |
receive(M message) |
getReceiver, send, setReceiver
public void receive(M message)
receive
in interface MessageReceiver<M extends Message>
public static <M extends Message,N extends Message> Function<MessageReceiver<N>,MessageReceiver<M>> lift(Function<M,? extends N> f)
see also the complete user documentation .