![]() |
Bukkit
1.4.7-R1.0
|
A class responsible for managing the registrations of plugin channels and their listeners. More...
Inheritance diagram for org.bukkit.plugin.messaging.Messenger:Public Member Functions | |
| boolean | isReservedChannel (String channel) |
| Checks if the specified channel is a reserved name. | |
| void | registerOutgoingPluginChannel (Plugin plugin, String channel) |
| Registers the specific plugin to the requested outgoing plugin channel, allowing it to send messages through that channel to any clients. | |
| void | unregisterOutgoingPluginChannel (Plugin plugin, String channel) |
| Unregisters the specific plugin from the requested outgoing plugin channel, no longer allowing it to send messages through that channel to any clients. | |
| void | unregisterOutgoingPluginChannel (Plugin plugin) |
| Unregisters the specific plugin from all outgoing plugin channels, no longer allowing it to send any plugin messages. | |
| PluginMessageListenerRegistration | registerIncomingPluginChannel (Plugin plugin, String channel, PluginMessageListener listener) |
| Registers the specific plugin for listening on the requested incoming plugin channel, allowing it to act upon any plugin messages. | |
| void | unregisterIncomingPluginChannel (Plugin plugin, String channel, PluginMessageListener listener) |
| Unregisters the specific plugin's listener from listening on the requested incoming plugin channel, no longer allowing it to act upon any plugin messages. | |
| void | unregisterIncomingPluginChannel (Plugin plugin, String channel) |
| Unregisters the specific plugin from listening on the requested incoming plugin channel, no longer allowing it to act upon any plugin messages. | |
| void | unregisterIncomingPluginChannel (Plugin plugin) |
| Unregisters the specific plugin from listening on all plugin channels through all listeners. | |
| Set< String > | getOutgoingChannels () |
| Gets a set containing all the outgoing plugin channels. | |
| Set< String > | getOutgoingChannels (Plugin plugin) |
| Gets a set containing all the outgoing plugin channels that the specified plugin is registered to. | |
| Set< String > | getIncomingChannels () |
| Gets a set containing all the incoming plugin channels. | |
| Set< String > | getIncomingChannels (Plugin plugin) |
| Gets a set containing all the incoming plugin channels that the specified plugin is registered for. | |
| Set < PluginMessageListenerRegistration > | getIncomingChannelRegistrations (Plugin plugin) |
| Gets a set containing all the incoming plugin channel registrations that the specified plugin has. | |
| Set < PluginMessageListenerRegistration > | getIncomingChannelRegistrations (String channel) |
| Gets a set containing all the incoming plugin channel registrations that are on the requested channel. | |
| Set < PluginMessageListenerRegistration > | getIncomingChannelRegistrations (Plugin plugin, String channel) |
| Gets a set containing all the incoming plugin channel registrations that the specified plugin has on the requested channel. | |
| boolean | isRegistrationValid (PluginMessageListenerRegistration registration) |
| Checks if the specified plugin message listener registration is valid. | |
| boolean | isIncomingChannelRegistered (Plugin plugin, String channel) |
| Checks if the specified plugin has registered to receive incoming messages through the requested channel. | |
| boolean | isOutgoingChannelRegistered (Plugin plugin, String channel) |
| Checks if the specified plugin has registered to send outgoing messages through the requested channel. | |
| void | dispatchIncomingMessage (Player source, String channel, byte[] message) |
| Dispatches the specified incoming message to any registered listeners. | |
Static Public Attributes | |
| static final int | MAX_MESSAGE_SIZE = 32766 |
| Represents the largest size that an individual Plugin Message may be. | |
| static final int | MAX_CHANNEL_SIZE = 16 |
| Represents the largest size that a Plugin Channel may be. | |
A class responsible for managing the registrations of plugin channels and their listeners.
Definition at line 11 of file Messenger.java.
| void org.bukkit.plugin.messaging.Messenger.dispatchIncomingMessage | ( | Player | source, |
| String | channel, | ||
| byte[] | message | ||
| ) |
Dispatches the specified incoming message to any registered listeners.
| source | Source of the message. |
| channel | Channel that the message was sent by. |
| message | Raw payload of the message. |
| Set<PluginMessageListenerRegistration> org.bukkit.plugin.messaging.Messenger.getIncomingChannelRegistrations | ( | Plugin | plugin | ) |
Gets a set containing all the incoming plugin channel registrations that the specified plugin has.
| plugin | Plugin to retrieve registrations for. |
| IllegalArgumentException | Thrown if plugin is null. |
| Set<PluginMessageListenerRegistration> org.bukkit.plugin.messaging.Messenger.getIncomingChannelRegistrations | ( | String | channel | ) |
Gets a set containing all the incoming plugin channel registrations that are on the requested channel.
| channel | Channel to retrieve registrations for. |
| IllegalArgumentException | Thrown if channel is null. |
| Set<PluginMessageListenerRegistration> org.bukkit.plugin.messaging.Messenger.getIncomingChannelRegistrations | ( | Plugin | plugin, |
| String | channel | ||
| ) |
Gets a set containing all the incoming plugin channel registrations that the specified plugin has on the requested channel.
| plugin | Plugin to retrieve registrations for. |
| channel | Channel to filter registrations by. |
| IllegalArgumentException | Thrown if plugin or channel is null. |
| Set<String> org.bukkit.plugin.messaging.Messenger.getIncomingChannels | ( | ) |
Gets a set containing all the incoming plugin channels.
| Set<String> org.bukkit.plugin.messaging.Messenger.getIncomingChannels | ( | Plugin | plugin | ) |
Gets a set containing all the incoming plugin channels that the specified plugin is registered for.
| plugin | Plugin to retrieve channels for. |
| IllegalArgumentException | Thrown if plugin is null. |
| Set<String> org.bukkit.plugin.messaging.Messenger.getOutgoingChannels | ( | ) |
Gets a set containing all the outgoing plugin channels.
| Set<String> org.bukkit.plugin.messaging.Messenger.getOutgoingChannels | ( | Plugin | plugin | ) |
Gets a set containing all the outgoing plugin channels that the specified plugin is registered to.
| plugin | Plugin to retrieve channels for. |
| IllegalArgumentException | Thrown if plugin is null. |
| boolean org.bukkit.plugin.messaging.Messenger.isIncomingChannelRegistered | ( | Plugin | plugin, |
| String | channel | ||
| ) |
Checks if the specified plugin has registered to receive incoming messages through the requested channel.
| plugin | Plugin to check registration for. |
| channel | Channel to test for. |
| boolean org.bukkit.plugin.messaging.Messenger.isOutgoingChannelRegistered | ( | Plugin | plugin, |
| String | channel | ||
| ) |
Checks if the specified plugin has registered to send outgoing messages through the requested channel.
| plugin | Plugin to check registration for. |
| channel | Channel to test for. |
Referenced by org.bukkit.plugin.messaging.StandardMessenger.validatePluginMessage().
| boolean org.bukkit.plugin.messaging.Messenger.isRegistrationValid | ( | PluginMessageListenerRegistration | registration | ) |
Checks if the specified plugin message listener registration is valid.
A registration is considered valid if it has not be unregistered and that the plugin is still enabled.
| registration | Registration to check. |
Referenced by org.bukkit.plugin.messaging.PluginMessageListenerRegistration.isValid().
| boolean org.bukkit.plugin.messaging.Messenger.isReservedChannel | ( | String | channel | ) |
Checks if the specified channel is a reserved name.
| channel | Channel name to check. |
| IllegalArgumentException | Thrown if channel is null. |
| PluginMessageListenerRegistration org.bukkit.plugin.messaging.Messenger.registerIncomingPluginChannel | ( | Plugin | plugin, |
| String | channel, | ||
| PluginMessageListener | listener | ||
| ) |
Registers the specific plugin for listening on the requested incoming plugin channel, allowing it to act upon any plugin messages.
| plugin | Plugin that wishes to register to this channel. |
| channel | Channel to register. |
| listener | Listener to receive messages on. |
| IllegalArgumentException | Thrown if plugin, channel or listener is null, or the listener is already registered for this channel. |
| void org.bukkit.plugin.messaging.Messenger.registerOutgoingPluginChannel | ( | Plugin | plugin, |
| String | channel | ||
| ) |
Registers the specific plugin to the requested outgoing plugin channel, allowing it to send messages through that channel to any clients.
| plugin | Plugin that wishes to send messages through the channel. |
| channel | Channel to register. |
| IllegalArgumentException | Thrown if plugin or channel is null. |
| void org.bukkit.plugin.messaging.Messenger.unregisterIncomingPluginChannel | ( | Plugin | plugin, |
| String | channel, | ||
| PluginMessageListener | listener | ||
| ) |
Unregisters the specific plugin's listener from listening on the requested incoming plugin channel, no longer allowing it to act upon any plugin messages.
| plugin | Plugin that wishes to unregister from this channel. |
| channel | Channel to unregister. |
| listener | Listener to stop receiving messages on. |
| IllegalArgumentException | Thrown if plugin, channel or listener is null. |
Referenced by org.bukkit.plugin.SimplePluginManager.disablePlugin().
| void org.bukkit.plugin.messaging.Messenger.unregisterIncomingPluginChannel | ( | Plugin | plugin, |
| String | channel | ||
| ) |
Unregisters the specific plugin from listening on the requested incoming plugin channel, no longer allowing it to act upon any plugin messages.
| plugin | Plugin that wishes to unregister from this channel. |
| channel | Channel to unregister. |
| IllegalArgumentException | Thrown if plugin or channel is null. |
| void org.bukkit.plugin.messaging.Messenger.unregisterIncomingPluginChannel | ( | Plugin | plugin | ) |
Unregisters the specific plugin from listening on all plugin channels through all listeners.
| plugin | Plugin that wishes to unregister from this channel. |
| IllegalArgumentException | Thrown if plugin is null. |
| void org.bukkit.plugin.messaging.Messenger.unregisterOutgoingPluginChannel | ( | Plugin | plugin, |
| String | channel | ||
| ) |
Unregisters the specific plugin from the requested outgoing plugin channel, no longer allowing it to send messages through that channel to any clients.
| plugin | Plugin that no longer wishes to send messages through the channel. |
| channel | Channel to unregister. |
| IllegalArgumentException | Thrown if plugin or channel is null. |
Referenced by org.bukkit.plugin.SimplePluginManager.disablePlugin().
| void org.bukkit.plugin.messaging.Messenger.unregisterOutgoingPluginChannel | ( | Plugin | plugin | ) |
Unregisters the specific plugin from all outgoing plugin channels, no longer allowing it to send any plugin messages.
| plugin | Plugin that no longer wishes to send plugin messages. |
| IllegalArgumentException | Thrown if plugin is null. |
|
static |
Represents the largest size that a Plugin Channel may be.
Definition at line 20 of file Messenger.java.
Referenced by org.bukkit.plugin.messaging.ChannelNameTooLongException.ChannelNameTooLongException(), and org.bukkit.plugin.messaging.StandardMessenger.validateChannel().
|
static |
Represents the largest size that an individual Plugin Message may be.
Definition at line 15 of file Messenger.java.
Referenced by org.bukkit.plugin.messaging.MessageTooLargeException.MessageTooLargeException(), and org.bukkit.plugin.messaging.StandardMessenger.validatePluginMessage().