Package io.smallrye.reactive.messaging
Class TargetedMessages.Default
java.lang.Object
io.smallrye.reactive.messaging.TargetedMessages.Default
- All Implemented Interfaces:
TargetedMessages,Message<Map<String,Message<?>>>
- Enclosing interface:
- TargetedMessages
Default
TargetedMessages implementation-
Nested Class Summary
Nested classes/interfaces inherited from interface io.smallrye.reactive.messaging.TargetedMessages
TargetedMessages.Default -
Field Summary
Fields inherited from interface org.eclipse.microprofile.reactive.messaging.Message
EMPTY_ACK, EMPTY_NACK, LOGGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMessage<?>Return the message associated with the given channelAdd a new mapping to this target mapping.withMessage(String channel, Message<?> message) Add a new mapping to this target mapping.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.microprofile.reactive.messaging.Message
ack, ack, addMetadata, getAck, getAckWithMetadata, getMetadata, getMetadata, getNack, getNackWithMetadata, nack, nack, thenApply, unwrap, withAck, withAckWithMetadata, withMetadata, withMetadata, withNack, withNackWithMetadata, withPayload
-
Constructor Details
-
Default
-
-
Method Details
-
get
Description copied from interface:TargetedMessagesReturn the message associated with the given channel- Specified by:
getin interfaceTargetedMessages- Parameters:
channel- the channel name- Returns:
- the
Messageassociated with the channel. Returnsnullif this mapping does not contain the given channel.
-
withMessage
Description copied from interface:TargetedMessagesAdd a new mapping to this target mapping. It returns a newTargetedMessagesinstance.- Specified by:
withMessagein interfaceTargetedMessages- Parameters:
channel- the channel to addmessage- the message to add- Returns:
- a new instance of
TargetedMessages
-
with
Description copied from interface:TargetedMessagesAdd a new mapping to this target mapping. If the given object is not an instance ofMessage, it'll be wrapped as a message- Specified by:
within interfaceTargetedMessages- Parameters:
channel- the channel to addpayload- the payload or message to add- Returns:
- a new instance of
Targeted
-
getPayload
- Specified by:
getPayloadin interfaceMessage<Map<String,Message<?>>> - Returns:
- The payload for this message.
-