Package io.smallrye.reactive.messaging
Interface TargetedMessages
- All Known Implementing Classes:
TargetedMessages.Default
Container of
Messages to send multiple messages to different channels
The TargetedMessages.Default implementation holds channel-message mappings in an unmodifiable Map.
This implementation returns the inner map from the Message.getPayload()
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.eclipse.microprofile.reactive.messaging.Message
EMPTY_ACK, EMPTY_NACK, LOGGER -
Method Summary
Modifier and TypeMethodDescriptionstatic TargetedMessagesstatic TargetedMessagesMessage<?>Return the message associated with the given channelstatic TargetedMessagesstatic TargetedMessagesstatic TargetedMessagesstatic TargetedMessagesof(String c1, Message<?> m1, String c2, Message<?> m2, String c3, Message<?> m3, String c4, Message<?> m4) static TargetedMessagesof(String c1, Message<?> m1, String c2, Message<?> m2, String c3, Message<?> m3, String c4, Message<?> m4, String c5, Message<?> m5) static TargetedMessagesof(String c1, Message<?> m1, String c2, Message<?> m2, String c3, Message<?> m3, String c4, Message<?> m4, String c5, Message<?> m5, String c6, Message<?> m6) Add a new mapping to this target mapping.withMessage(String channel, Message<?> message) Add a new mapping to this target mapping.Methods inherited from interface org.eclipse.microprofile.reactive.messaging.Message
ack, ack, addMetadata, getAck, getAckWithMetadata, getMetadata, getMetadata, getNack, getNackWithMetadata, getPayload, nack, nack, thenApply, unwrap, withAck, withAckWithMetadata, withMetadata, withMetadata, withNack, withNackWithMetadata, withPayload
-
Method Details
-
from
- Parameters:
payloads-- Returns:
-
from
-
of
-
of
-
of
-
of
-
of
-
of
-
get
Return the message associated with the given channel- Parameters:
channel- the channel name- Returns:
- the
Messageassociated with the channel. Returnsnullif this mapping does not contain the given channel.
-
withMessage
Add a new mapping to this target mapping. It returns a newTargetedMessagesinstance.- Parameters:
channel- the channel to addmessage- the message to add- Returns:
- a new instance of
TargetedMessages
-
with
Add a new mapping to this target mapping. If the given object is not an instance ofMessage, it'll be wrapped as a message- Parameters:
channel- the channel to addpayloadOrMessage- the payload or message to add- Returns:
- a new instance of
Targeted
-