コード例 #1
0
  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);
    }
  }
コード例 #2
0
 public void leave(String room, UUID sessionId) {
   leave(roomClients, room, sessionId);
   clientRooms.remove(sessionId);
 }
コード例 #3
0
 public void leaveRoom(String room, UUID sessionId) {
   leave(room, sessionId);
   storeFactory
       .pubSubStore()
       .publish(PubSubStore.LEAVE, new JoinLeaveMessage(sessionId, room, getName()));
 }