Package com.caucho.server.session

Examples of com.caucho.server.session.SessionImpl


    String id = getSessionId();

    long now = Alarm.getCurrentTime();

    SessionImpl session
      = manager.createSession(create, this, id, now,
                              isSessionIdFromCookie());

    if (session != null
        && (id == null || ! session.getId().equals(id))
        && manager.enableSessionCookies()) {
      setSessionId(session.getId());
    }

    // server/0123 vs TCK
    /*
    if (session != null)
View Full Code Here


    return _sessionGroup;
  }

  void saveSession()
  {
    SessionImpl session = _session;
    if (session != null)
      session.save();
  }
View Full Code Here

  //

  protected void finishRequest()
    throws IOException
  {
    SessionImpl session = _session;

    if (session == null && getSessionId() != null) {
      WebApp webApp = getWebApp();
     
      if (webApp != null && webApp.isActive()) {
        session = (SessionImpl) getSession(false);
      }
    }

    if (session != null)
      session.finishRequest();
  }
View Full Code Here

   */
  protected Principal findSavedUser(HttpServletRequest request)
  {
    SingleSignon singleSignon = getSingleSignon();

    SessionImpl session = (SessionImpl) request.getSession(false);

    String sessionId;

    if (session != null)
      sessionId = session.getId();
    else
      sessionId = request.getRequestedSessionId();

    if (sessionId != null && singleSignon != null)
      return singleSignon.get(sessionId);
View Full Code Here

  {
    request.setAttribute(LOGIN_NAME, user);

    SingleSignon singleSignon = getSingleSignon();

    SessionImpl session;

    if (isSessionSaveLogin())
      session = (SessionImpl) request.getSession(true);
    else
      session = (SessionImpl) request.getSession(false);

    String sessionId;

    if (session != null)
      sessionId = session.getId();
    else
      sessionId = request.getRequestedSessionId();

    if (sessionId != null && singleSignon != null)
      singleSignon.put(sessionId, user);
View Full Code Here

        return true;

      boolean isEmpty = true;
      for (int i = sessions.size() - 1; i >= 0; i--) {
        SoftReference<SessionImpl> ref = sessions.get(i);
        SessionImpl session = ref.get();

        try {
          if (session == timeoutSession) {
            sessions.remove(i);
            // session.logout();
View Full Code Here

      ArrayList<SoftReference<SessionImpl>> sessions = _sessions;
      _sessions = null;

      for (int i = 0; sessions != null && i < sessions.size(); i++) {
        SoftReference<SessionImpl> ref = sessions.get(i);
        SessionImpl session = ref.get();

        try {
          if (session != null) {
            // session.logout();
            session.invalidateLogout()// #599,  server/12i3
          }
        } catch (Exception e) {
          log.log(Level.WARNING, e.toString(), e);
        }
      }
View Full Code Here

      return true;

    boolean isEmpty = true;
    for (int i = sessions.size() - 1; i >= 0; i--) {
      SoftReference<SessionImpl> ref = sessions.get(i);
      SessionImpl session = ref.get();

      try {
  if (session == timeoutSession) {
    sessions.remove(i);
    // session.logout();
View Full Code Here

    ArrayList<SoftReference<SessionImpl>> sessions = _sessions;
    _sessions = null;
     
    for (int i = 0; sessions != null && i < sessions.size(); i++) {
      SoftReference<SessionImpl> ref = sessions.get(i);
      SessionImpl session = ref.get();

      try {
  if (session != null) {
    // session.logout();
    session.invalidateLogout()// #599,  server/12i3
  }
      } catch (Exception e) {
  log.log(Level.WARNING, e.toString(), e);
      }
    }
View Full Code Here

    String id = getRequestedSessionId();

    if (id == null)
      return false;

    SessionImpl session = _session;

    if (session == null)
      session = (SessionImpl) getSession(false);

    return session != null && session.isValid() && session.getId().equals(id);
  }
View Full Code Here

TOP

Related Classes of com.caucho.server.session.SessionImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.