public void closeAuthenticatedSession(String httpSessionId) {
    Set<WsSession> wsSessions = authenticatedSessions.remove(httpSessionId);

    if (wsSessions != null && !wsSessions.isEmpty()) {
      for (WsSession wsSession : wsSessions) {
        try {
          wsSession.close(AUTHENTICATED_HTTP_SESSION_CLOSED);
        } catch (IOException e) {
          // Any IOExceptions during close will have been caught and the
          // onError method called.
        }
      }
    }
  }
Example #2
0
 @Override
 public void close() throws IOException {
   close(new CloseReason(CloseCodes.NORMAL_CLOSURE, ""));
 }