예제 #1
0
 public void addRoomListener(String roomName, IChatRoomListener listener) {
   ChatRoom r = getRoom(roomName);
   if (r != null) {
     r.addRoomListener(listener);
     return;
   }
   log.warn("Adding listener to a non-existing room " + roomName);
 }
예제 #2
0
 public List<ChatMessageVO> getChatMessages(String room) {
   ChatRoom r = getRoom(room);
   if (r != null) {
     return r.getChatMessages();
   }
   log.warn("Getting messages from a non-existing room " + room);
   return null;
 }
예제 #3
0
 public void sendMessage(String room, ChatMessageVO chatobj) {
   ChatRoom r = getRoom(room);
   if (r != null) {
     r.sendMessage(chatobj);
   } else {
     log.warn("Sending message to a non-existing room " + room);
   }
 }
예제 #4
0
 public void addRoom(ChatRoom room) {
   log.debug("In ChatRoomsManager adding room " + room.getName());
   rooms.put(room.getName(), room);
 }