netbattle
Class ChatChanel

java.lang.Object
  extended by netbattle.ChatChanel

public class ChatChanel
extends java.lang.Object


Constructor Summary
ChatChanel(java.lang.String name, boolean priv)
          Creates a new instance of ChatChanel
 
Method Summary
 void addClient(NetClient client)
          Add a client to this channel.
 int getChannelId()
          Return the ID of this channel.
 java.lang.String getChannelName()
          Return the name of this channel.
 java.lang.String[] getUserList()
          Get a list of users in this channel.
 boolean isPrivate()
          Return whether this channel is private.
 void removeClient(NetClient client)
          Remove a client from this channel.
 void sendMessage(NetMessage msg)
          Send a message to everybody in this channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatChanel

public ChatChanel(java.lang.String name,
                  boolean priv)
Creates a new instance of ChatChanel

Parameters:
name - the name of this channel
priv - whether this chanel should be known to all users
Method Detail

isPrivate

public boolean isPrivate()
Return whether this channel is private.


getChannelName

public java.lang.String getChannelName()
Return the name of this channel.


addClient

public void addClient(NetClient client)
Add a client to this channel.


removeClient

public void removeClient(NetClient client)
Remove a client from this channel.


sendMessage

public void sendMessage(NetMessage msg)
Send a message to everybody in this channel.


getUserList

public java.lang.String[] getUserList()
Get a list of users in this channel.


getChannelId

public int getChannelId()
Return the ID of this channel.