public void monitorConference(String roomId) { if (roomId == null) { logger.error("monitorConference roomId null"); throw new IllegalArgumentException("roomId can not be null"); } synchronized (noteTakers) { NoteTaker noteTaker = new NoteTaker(roomId); noteTaker.joinConference(); noteTakers.put(roomId, noteTaker); if (logger.isDebugEnabled()) logger.debug("add " + noteTakers); } }
public void unmonitorConference(String roomId) { if (roomId == null) { logger.error("unmonitorConference roomId null"); throw new IllegalArgumentException("roomId can not be null"); } synchronized (noteTakers) { NoteTaker noteTaker = (NoteTaker) noteTakers.get(roomId); if (noteTaker != null) { noteTaker.leaveConference(); noteTakers.remove(roomId); } } }