public interface ChannelRegistrar
ChannelBinding
s to and from
PlayerConnection
s and the server.Modifier and Type | Method and Description |
---|---|
ChannelBinding.IndexedMessageChannel |
createChannel(Object plugin,
String channel)
Creates a new channel binding for the given channel name.
|
ChannelBinding.RawDataChannel |
createRawChannel(Object plugin,
String channel)
Creates a new raw channel binding.
|
Set<String> |
getRegisteredChannels(Platform.Type side)
Gets the set of registered channels.
|
boolean |
isChannelAvailable(String channelName)
Returns whether the given channel name is available for creating with
createChannel(java.lang.Object, java.lang.String) . |
void |
unbindChannel(ChannelBinding channel)
Remove the channel binding from this registrar, freeing up the channel
name.
|
ChannelBinding.IndexedMessageChannel createChannel(Object plugin, String channel) throws ChannelRegistrationException
plugin
- The plugin registering the channelchannel
- The channel to registerChannelBinding
instance bound to the channel nameChannelRegistrationException
- The channel name is too longChannelRegistrationException
- The channel name is reservedChannelBinding.RawDataChannel createRawChannel(Object plugin, String channel) throws ChannelRegistrationException
ChannelBuf
objects.plugin
- The plugin registering the channelchannel
- The channel to registerChannelBinding
instance bound to the channel nameChannelRegistrationException
- The channel name is too longChannelRegistrationException
- The channel name is reservedcreateChannel(java.lang.Object, java.lang.String)
void unbindChannel(ChannelBinding channel)
IllegalStateException
.channel
- The channel to unbindSet<String> getRegisteredChannels(Platform.Type side)
side
- The side to get the registered channels fromboolean isChannelAvailable(String channelName)
createChannel(java.lang.Object, java.lang.String)
.channelName
- The channel name to test