public class DelegateMutableMessageChannel extends AbstractMutableMessageChannel
Modifier and Type | Field and Description |
---|---|
protected MessageChannel |
delegate |
members
TO_ALL, TO_CONSOLE, TO_NONE, TO_PLAYERS
Constructor and Description |
---|
DelegateMutableMessageChannel(MessageChannel delegate)
Constructs a delegate mutable message channel.
|
Modifier and Type | Method and Description |
---|---|
Optional<Text> |
transformMessage(Object sender,
MessageReceiver recipient,
Text original,
ChatType type)
Handle transforming the input message appropriately.
|
addMember, clearMembers, getMembers, removeMember
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asMutable
protected final MessageChannel delegate
public DelegateMutableMessageChannel(MessageChannel delegate)
The members from the provided channel are copied into our own local collection.
delegate
- The delegate channelpublic Optional<Text> transformMessage(@Nullable Object sender, MessageReceiver recipient, Text original, ChatType type)
MessageChannel
sender
- The sender of the messagerecipient
- The recipient of the messageoriginal
- The original message, to optionally transformtype
- The type of messageOptional.empty()