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)
      session = (SessionImpl) getSession(false);

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

        setHasCookie();

      return hSession;
    }
    else {
      SessionImpl oldSession = _session;
      _session = createSession(create, oldSession != null);
    }

    if (_session != null)
      setHasCookie();
View Full Code Here

    String id = getRequestedSessionId();

    long now = Alarm.getCurrentTime();

    SessionImpl session;

    if (id != null && id.length() > 6) {
      session = manager.getSession(id, now, create,
           isRequestedSessionIdFromCookie());
      if (session == null) {
      }
      else if (session.isValid()) {
        if (session != null)
          setHasCookie();
        if (! session.getId().equals(id) && manager.enableSessionCookies()) {
    HttpServletResponse response = getResponse();

    if (response instanceof CauchoResponse)
      ((CauchoResponse) getResponse()).setSessionId(session.getId());
  }

        return session;
      }
    }
    else
      id = null;

    if (! create)
      return null;

    // Must accept old ids because different webApps in the same
    // server must share the same cookie
    //
    // But, if the session group doesn't match, then create a new
    // session.

    session = manager.createSession(id, now, this,
            isRequestedSessionIdFromCookie());

    if (session != null)
      setHasCookie();

    if (session.getId().equals(id))
      return session;

    if (manager.enableSessionCookies()) {
      HttpServletResponse response = getResponse();

      if (response instanceof CauchoResponse)
  ((CauchoResponse) getResponse()).setSessionId(session.getId());
    }

    return session;
  }
View Full Code Here

   * Cleans up at the end of the request
   */
  public void finishRequest()
    throws IOException
  {
    SessionImpl session = _session;
    _session = null;

    if (session != null)
      session.finishRequest();
  }
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.