public void onDisconnect(SocketIOClient client) { allClients.remove(client.getSessionId()); leave(getName(), client.getSessionId()); storeFactory .pubSubStore() .publish( PubSubStore.LEAVE, new JoinLeaveMessage(client.getSessionId(), getName(), getName())); try { for (DisconnectListener listener : disconnectListeners) { listener.onDisconnect(client); } } catch (Exception e) { exceptionListener.onDisconnectException(e, client); } }
public void leave(String room, UUID sessionId) { leave(roomClients, room, sessionId); clientRooms.remove(sessionId); }
public void leaveRoom(String room, UUID sessionId) { leave(room, sessionId); storeFactory .pubSubStore() .publish(PubSubStore.LEAVE, new JoinLeaveMessage(sessionId, room, getName())); }