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); }
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; }
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); } }
public void addRoom(ChatRoom room) { log.debug("In ChatRoomsManager adding room " + room.getName()); rooms.put(room.getName(), room); }