public interface MessageReceiver
Modifier and Type | Method and Description |
---|---|
MessageChannel |
getMessageChannel()
Return the message channel that messages from this source should be sent
to.
|
void |
sendMessage(Text message)
Sends a message to this receiver.
|
default void |
sendMessage(TextTemplate template)
Sends a message constructed from the
TextTemplate to
this receiver. |
default void |
sendMessage(TextTemplate template,
Map<String,TextElement> parameters)
Sends a message constructed from the
TextTemplate and
parameters to this receiver. |
default void |
sendMessages(Iterable<Text> messages)
Sends the message(s) to this receiver.
|
default void |
sendMessages(Text... messages)
Sends the message(s) to this receiver.
|
void |
setMessageChannel(MessageChannel channel)
Sets the message channel that messages sent by this source should be sent
to.
|
void sendMessage(Text message)
If text formatting is not supported in the implementation it will be displayed as plain text.
message
- The messagedefault void sendMessage(TextTemplate template)
TextTemplate
to
this receiver.
If text formatting is not supported in the implementation it will be displayed as plain text.
template
- The text templatedefault void sendMessage(TextTemplate template, Map<String,TextElement> parameters)
TextTemplate
and
parameters
to this receiver.
If text formatting is not supported in the implementation it will be displayed as plain text.
template
- The text templateparameters
- The parameters to apply to the templatedefault void sendMessages(Text... messages)
If text formatting is not supported in the implementation it will be displayed as plain text.
messages
- The message(s)default void sendMessages(Iterable<Text> messages)
If text formatting is not supported in the implementation it will be displayed as plain text.
messages
- The messagesMessageChannel getMessageChannel()
void setMessageChannel(MessageChannel channel)
channel
- The message channel to send messages to