public void registerCallback(String cName, String cStatus, OEClientCallbackInterface tCallback) { if (!clientMap.containsKey(cName)) { clientMap.put(cName, tCallback); clientStatusMap.put(cName, cStatus); String msg = "[" + dateFormat.format(new Date()) + "] <strong>" + cName + "</strong> has joined the telepointer session </br>"; view.appendArchive(msg); } }
public void unRegisterCallback(String cName) { if (clientMap.containsKey(cName)) { clientMap.remove(cName); String msg = "[" + dateFormat.format(new Date()) + "] <strong>" + cName + "</strong> has left the telepointer session </br>"; view.appendArchive(msg); if (clientMap.size() == 0) { currPoint = new Point(25, 90); } } if (clientStatusMap.containsKey(cName)) { clientStatusMap.remove(cName); } }