Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.plugin.messaging.StandardMessenger Class Reference

Standard implementation to Messenger. More...

+ Inheritance diagram for org.bukkit.plugin.messaging.StandardMessenger:
+ Collaboration diagram for org.bukkit.plugin.messaging.StandardMessenger:

Public Member Functions

boolean isReservedChannel (String channel)
 
void registerOutgoingPluginChannel (Plugin plugin, String channel)
 
void unregisterOutgoingPluginChannel (Plugin plugin, String channel)
 
void unregisterOutgoingPluginChannel (Plugin plugin)
 
PluginMessageListenerRegistration registerIncomingPluginChannel (Plugin plugin, String channel, PluginMessageListener listener)
 
void unregisterIncomingPluginChannel (Plugin plugin, String channel, PluginMessageListener listener)
 
void unregisterIncomingPluginChannel (Plugin plugin, String channel)
 
void unregisterIncomingPluginChannel (Plugin plugin)
 
Set< String > getOutgoingChannels ()
 
Set< String > getOutgoingChannels (Plugin plugin)
 
Set< String > getIncomingChannels ()
 
Set< String > getIncomingChannels (Plugin plugin)
 
Set
< PluginMessageListenerRegistration
getIncomingChannelRegistrations (Plugin plugin)
 
Set
< PluginMessageListenerRegistration
getIncomingChannelRegistrations (String channel)
 
Set
< PluginMessageListenerRegistration
getIncomingChannelRegistrations (Plugin plugin, String channel)
 
boolean isRegistrationValid (PluginMessageListenerRegistration registration)
 
boolean isIncomingChannelRegistered (Plugin plugin, String channel)
 
boolean isOutgoingChannelRegistered (Plugin plugin, String channel)
 
void dispatchIncomingMessage (Player source, String channel, byte[] message)
 
- Public Member Functions inherited from org.bukkit.plugin.messaging.Messenger
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 Member Functions

static void validateChannel (String channel)
 Validates a Plugin Channel name.
 
static void validatePluginMessage (Messenger messenger, Plugin source, String channel, byte[] message)
 Validates the input of a Plugin Message, ensuring the arguments are all valid.
 

Additional Inherited Members

- Static Public Attributes inherited from org.bukkit.plugin.messaging.Messenger
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.
 

Detailed Description

Standard implementation to Messenger.

Definition at line 15 of file StandardMessenger.java.

Member Function Documentation

Set<PluginMessageListenerRegistration> org.bukkit.plugin.messaging.StandardMessenger.getIncomingChannelRegistrations ( Plugin  plugin)
Set<PluginMessageListenerRegistration> org.bukkit.plugin.messaging.StandardMessenger.getIncomingChannelRegistrations ( String  channel)
Set<PluginMessageListenerRegistration> org.bukkit.plugin.messaging.StandardMessenger.getIncomingChannelRegistrations ( Plugin  plugin,
String  channel 
)
Set<String> org.bukkit.plugin.messaging.StandardMessenger.getIncomingChannels ( )

Definition at line 274 of file StandardMessenger.java.

Set<String> org.bukkit.plugin.messaging.StandardMessenger.getIncomingChannels ( Plugin  plugin)
Set<String> org.bukkit.plugin.messaging.StandardMessenger.getOutgoingChannels ( )

Definition at line 251 of file StandardMessenger.java.

Set<String> org.bukkit.plugin.messaging.StandardMessenger.getOutgoingChannels ( Plugin  plugin)

Definition at line 258 of file StandardMessenger.java.

boolean org.bukkit.plugin.messaging.StandardMessenger.isIncomingChannelRegistered ( Plugin  plugin,
String  channel 
)
boolean org.bukkit.plugin.messaging.StandardMessenger.isOutgoingChannelRegistered ( Plugin  plugin,
String  channel 
)
boolean org.bukkit.plugin.messaging.StandardMessenger.isRegistrationValid ( PluginMessageListenerRegistration  registration)
PluginMessageListenerRegistration org.bukkit.plugin.messaging.StandardMessenger.registerIncomingPluginChannel ( Plugin  plugin,
String  channel,
PluginMessageListener  listener 
)
void org.bukkit.plugin.messaging.StandardMessenger.registerOutgoingPluginChannel ( Plugin  plugin,
String  channel 
)
void org.bukkit.plugin.messaging.StandardMessenger.unregisterIncomingPluginChannel ( Plugin  plugin,
String  channel,
PluginMessageListener  listener 
)
void org.bukkit.plugin.messaging.StandardMessenger.unregisterIncomingPluginChannel ( Plugin  plugin,
String  channel 
)
void org.bukkit.plugin.messaging.StandardMessenger.unregisterIncomingPluginChannel ( Plugin  plugin)

Definition at line 243 of file StandardMessenger.java.

void org.bukkit.plugin.messaging.StandardMessenger.unregisterOutgoingPluginChannel ( Plugin  plugin,
String  channel 
)
void org.bukkit.plugin.messaging.StandardMessenger.unregisterOutgoingPluginChannel ( Plugin  plugin)

Definition at line 195 of file StandardMessenger.java.

static void org.bukkit.plugin.messaging.StandardMessenger.validatePluginMessage ( Messenger  messenger,
Plugin  source,
String  channel,
byte[]  message 
)
static

Validates the input of a Plugin Message, ensuring the arguments are all valid.

Parameters
messengerMessenger to use for validation.
sourceSource plugin of the Message.
channelPlugin Channel to send the message by.
messageRaw message payload to send.
Exceptions
IllegalArgumentExceptionThrown if the source plugin is disabled.
IllegalArgumentExceptionThrown if source, channel or message is null.
MessageTooLargeExceptionThrown if the message is too big.
ChannelNameTooLongExceptionThrown if the channel name is too long.
ChannelNotRegisteredExceptionThrown if the channel is not registered for this plugin.

Definition at line 455 of file StandardMessenger.java.

References org.bukkit.plugin.Plugin.isEnabled(), org.bukkit.plugin.messaging.Messenger.isOutgoingChannelRegistered(), org.bukkit.plugin.messaging.Messenger.MAX_MESSAGE_SIZE, and org.bukkit.plugin.messaging.StandardMessenger.validateChannel().


The documentation for this class was generated from the following file: