public class DelegateMessageChannel extends Object implements MessageChannel
The delegate channel may be immutable or mutable.
| Modifier and Type | Field and Description |
|---|---|
protected MessageChannel |
delegate |
TO_ALL, TO_CONSOLE, TO_NONE, TO_PLAYERS| Constructor and Description |
|---|
DelegateMessageChannel(MessageChannel delegate)
Creates a delegate
MessageChannel that delegates all functions
to the delegated message channel. |
| Modifier and Type | Method and Description |
|---|---|
Collection<MessageReceiver> |
getMembers()
Gets a collection of all members in this channel.
|
Optional<Text> |
transformMessage(Object sender,
MessageReceiver recipient,
Text original,
ChatType type)
Handle transforming the input message appropriately.
|
protected final MessageChannel delegate
public DelegateMessageChannel(MessageChannel delegate)
MessageChannel that delegates all functions
to the delegated message channel.delegate - The delegated message channelpublic Optional<Text> transformMessage(@Nullable Object sender, MessageReceiver recipient, Text original, ChatType type)
MessageChanneltransformMessage in interface MessageChannelsender - The sender of the messagerecipient - The recipient of the messageoriginal - The original message, to optionally transformtype - The type of messageOptional.empty()public Collection<MessageReceiver> getMembers()
MessageChannelgetMembers in interface MessageChannel