log.debug("removeUserFromAllLists room_id: "+room_id);
//Check Initial Loaders
Map<String,WhiteboardSyncLockObject> syncListRoom = this.whiteBoardObjectListManager.getWhiteBoardSyncListByRoomid(room_id);
WhiteboardSyncLockObject wSyncLockObject = syncListRoom.get(currentClient.getPublicSID());
if (wSyncLockObject != null) {
syncListRoom.remove(currentClient.getPublicSID());
}
this.whiteBoardObjectListManager.setWhiteBoardSyncListByRoomid(room_id, syncListRoom);
int numberOfInitial = this.getNumberOfInitialLoaders(syncListRoom);
log.debug("scope "+scope);
if (numberOfInitial==0 && scope != null){
Collection<Set<IConnection>> conCollection = scope.getConnections();
for (Set<IConnection> conset : conCollection) {
for (IConnection conn : conset) {
if (conn != null) {
if (conn instanceof IServiceCapableConnection) {
RoomClient rcl = this.clientListManager.getClientByStreamId(conn.getClient().getId());
if (rcl != null) {
if (rcl.getIsScreenClient() != null && rcl.getIsScreenClient()) {
//continue;
} else {
if (!rcl.getPublicSID().equals(currentClient.getPublicSID())) {
//do not send to current
((IServiceCapableConnection) conn).invoke("sendSyncCompleteFlag", new Object[] { wSyncLockObject },this);
}
}
}
}
}
}
}
}
//Check Image Loaders
Map<String,Map<String,WhiteboardSyncLockObject>> syncListRoomImages = this.whiteBoardObjectListManager.getWhiteBoardObjectSyncListByRoomid(room_id);
for (Iterator<String> iter = syncListRoomImages.keySet().iterator();iter.hasNext();) {
String object_id = iter.next();
Map<String,WhiteboardSyncLockObject> syncListImages = syncListRoomImages.get(object_id);
WhiteboardSyncLockObject wImagesSyncLockObject = syncListImages.get(currentClient.getPublicSID());
if (wImagesSyncLockObject != null) {
syncListImages.remove(currentClient.getPublicSID());
}
this.whiteBoardObjectListManager.setWhiteBoardImagesSyncListByRoomAndObjectId(room_id, object_id, syncListImages);
}