|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jetrix.ChannelManager
public class ChannelManager
Manages Channels
Method Summary | |
---|---|
Collection<Channel> |
channels()
Returns an iterator over the channels available. |
void |
clear()
Clear the channel list. |
void |
closeAll()
Close all channels. |
Channel |
createChannel(ChannelConfig config)
Create a channel and start it immediately. |
Channel |
createChannel(ChannelConfig config,
boolean start)
Create a channel initialized with the specified configuration. |
Channel |
getChannel(int num)
Get a channel by number in the list. |
Channel |
getChannel(String name)
Return the channel with the specified name. |
Channel |
getChannel(String name,
boolean partial)
Returns the channel with the specified name. |
int |
getChannelCount()
Returns the number of existing channels. |
Channel |
getHomeChannel(int level)
Return the most suitable home channel for a player newly connected, that's the first accessible channel with players to play with. |
static ChannelManager |
getInstance()
|
Channel |
getOpenedChannel()
Deprecated. |
void |
removeChannel(Channel channel)
Remove a channel. |
void |
removeChannel(String name)
Remove a channel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ChannelManager getInstance()
public Channel createChannel(ChannelConfig config)
config
- the channel configurationpublic Channel createChannel(ChannelConfig config, boolean start)
config
- the channel configurationstart
- initial statepublic void removeChannel(String name)
public void removeChannel(Channel channel)
public int getChannelCount()
public Collection<Channel> channels()
public Channel getOpenedChannel()
public Channel getHomeChannel(int level)
level
- the access level of the player added in the channelpublic Channel getChannel(String name)
name
- the name of the channel to find
public Channel getChannel(String name, boolean partial)
partial
parameter is set to
true
.
name
- the name of the channel to findpartial
- use the partial name matching
public void clear()
public void closeAll()
public Channel getChannel(int num)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |