public int sendCompletedObjectSyncEvent(String object_id) {
try {
log.debug("sendCompletedObjectSyncEvent: "+object_id);
IConnection current = Red5.getConnectionLocal();
String streamid = current.getClient().getId();
RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
Long room_id = currentClient.getRoom_id();
Map<String,WhiteboardSyncLockObject> syncListImage = this.whiteBoardObjectListManager.getWhiteBoardObjectSyncListByRoomAndObjectId(room_id,object_id);
log.debug("sendCompletedObjectSyncEvent syncListImage: "+syncListImage);
WhiteboardSyncLockObject wSyncLockObject = syncListImage.get(currentClient.getPublicSID());
if (wSyncLockObject == null) {
log.error("WhiteboardSyncLockObject not found for this Client "+currentClient.getPublicSID());
log.error("WhiteboardSyncLockObject not found for this syncListImage "+syncListImage);
return -2;
} else {
log.debug("sendCompletedImagesSyncEvent remove: "+currentClient.getPublicSID());
syncListImage.remove(currentClient.getPublicSID());
this.whiteBoardObjectListManager.setWhiteBoardImagesSyncListByRoomAndObjectId(room_id, object_id, syncListImage);
int numberOfInitial = this.whiteBoardObjectListManager.getWhiteBoardObjectSyncListByRoomid(room_id).size();
log.debug("sendCompletedImagesSyncEvent numberOfInitial: "+numberOfInitial);
if (numberOfInitial==0){
int returnVal = 0;
Collection<Set<IConnection>> conCollection = current.getScope().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());