jChatBox.Chat
Class ChatroomManager

java.lang.Object
  |
  +--jChatBox.Chat.ChatroomManager

public class ChatroomManager
extends java.lang.Object
implements java.io.Serializable

This class (Singleton) manages all chatrooms.

See Also:
Serialized Form

Method Summary
 void addChatroom(Chatroom chatroom)
          Adds a chatroom.
 void destroy()
          Backup ChatroomManager.
 Chatroom getChatroom(int id)
          Returns a chatroom identified by its ID.
 java.util.Vector getChatrooms()
          Lists all chatrooms.
 int getChatroomUID()
          Returns an UID for a chatroom.
static ChatroomManager getInstance()
          Returns ChatroomManager Singleton.
 void removeChatroom(int id)
          Removes a chatroom identified by its ID.
 void reOpen()
          reOpen ChatroomManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ChatroomManager getInstance()
Returns ChatroomManager Singleton.

getChatroomUID

public int getChatroomUID()
Returns an UID for a chatroom.

reOpen

public void reOpen()
reOpen ChatroomManager.

addChatroom

public void addChatroom(Chatroom chatroom)
Adds a chatroom.

removeChatroom

public void removeChatroom(int id)
                    throws ChatException
Removes a chatroom identified by its ID.

getChatroom

public Chatroom getChatroom(int id)
                     throws ChatException
Returns a chatroom identified by its ID.

getChatrooms

public java.util.Vector getChatrooms()
Lists all chatrooms. (Not sorted).

destroy

public void destroy()
Backup ChatroomManager.