use of org.apache.openmeetings.db.entity.basic.IClient in project openmeetings by apache.
the class ClientManager method removeFromRoom.
public IClient removeFromRoom(IClient _c) {
Long roomId = _c.getRoomId();
log.debug("Removing online room client: {}, room: {}", _c.getUid(), roomId);
if (roomId != null) {
IMap<Long, Set<String>> rooms = rooms();
rooms.lock(roomId);
Set<String> clients = rooms.get(roomId);
if (clients != null) {
clients.remove(_c.getUid());
rooms.put(roomId, clients);
onlineRooms.put(roomId, clients);
}
rooms.unlock(roomId);
/* FIXME TODO KurentoHandler
if (_c instanceof StreamClient) {
StreamClient sc = (StreamClient)_c;
if (Client.Type.mobile != sc.getType() && Client.Type.sip != sc.getType()) {
scopeAdapter.roomLeaveByScope(_c, roomId);
}
}
*/
if (_c instanceof Client) {
// FIXME TODO scopeAdapter.dropSharing(_c, roomId);
Client c = (Client) _c;
kHandler.leaveRoom(c);
/* FIXME TODO
IScope sc = scopeAdapter.getChildScope(roomId);
for (String uid : c.getStreams()) {
scopeAdapter.sendMessageById("quit", uid, sc);
}
*/
c.setRoom(null);
c.clear();
update(c);
}
}
return _c;
}
Aggregations