Exemplo n.º 1
0
  public void update(Session session) {
    Validate.notNull(session);
    log.debug("Updating " + session);

    String sessionId = session.getId();
    remove(sessionId);
    add(session);
  }
Exemplo n.º 2
0
  /*
   * (non-Javadoc)
   *
   * @see
   * com.vmware.identity.session.SessionManager#add(com.vmware.identity.session
   * .Session)
   */
  public void add(Session session) {
    Validate.notNull(session);
    log.debug("Adding " + session.toString());

    this.lock.lock();

    try {
      this.sessions.put(session.getId(), session);
      for (SessionParticipant participant : session.getSessionParticipants()) {
        this.sessionParticipants.put(participant.getSessionId(), session.getId());
      }
      if (session.getLogoutRequestData() != null
          && session.getLogoutRequestData().getCurrentRequestId() != null) {
        this.sessionRequests.put(
            session.getLogoutRequestData().getCurrentRequestId(), session.getId());
      }
    } finally {
      this.lock.unlock();
    }
  }