Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jChatBox.Chat
Class ChatroomManager

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

All Implemented Interfaces:
  java.io.Serializable

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.
`Chatroom` | `getChatroom(java.lang.String name)` Returns a chatroom identified by its name.
`java.util.Vector` | `getChatrooms()` Lists all chatrooms (Sorted by ID).
`int` | `getChatroomUID()` Returns an UID for a chatroom.
`static ChatroomManager` | `getInstance()` Returns ChatroomManager Singleton.
`boolean` | `isModerateAllowed(int chatroomid, java.lang.String userid)` Returns whether or not moderating is allowed for userid to chatroomid.
`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.

    `ChatException`

### isModerateAllowed

    public boolean isModerateAllowed(int chatroomid,
                                     java.lang.String userid)
                              throws ChatException

  Returns whether or not moderating is allowed for userid to chatroomid.

    `ChatException`

### getChatroom

    public Chatroom getChatroom(int id)
                         throws ChatException

  Returns a chatroom identified by its ID.

    `ChatException`

### getChatroom

    public Chatroom getChatroom(java.lang.String name)
                         throws ChatException

  Returns a chatroom identified by its name.

    `ChatException`

### getChatrooms

    public java.util.Vector getChatrooms()

  Lists all chatrooms (Sorted by ID). First chatroom created as ID=1, and so on ...

### destroy

    public void destroy()

  Backup ChatroomManager.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD