Java 类org.eclipse.jetty.server.session.AbstractSession 实例源码

项目:nano-framework    文件:AbstractSessionManager.java   
@Override
public final void removeSession(final AbstractSession session, boolean invalidate) {
    final String clusterId = getClusterId(session);
    final boolean removed = removeSession(clusterId);
    if (removed) {
        _sessionsStats.decrement();
        _sessionTimeStats.set(Math.round((System.currentTimeMillis() - session.getCreationTime()) / 1000.0));
        _sessionIdManager.removeSession(session);
        if (invalidate) {
            _sessionIdManager.invalidateAll(session.getClusterId());
        }

        if (invalidate && _sessionListeners != null) {
            final HttpSessionEvent event = new HttpSessionEvent(session);
            for (int i = LazyList.size(_sessionListeners); i-- > 0;) {
                ((HttpSessionListener) LazyList.get(_sessionListeners, i)).sessionDestroyed(event);
            }
        }

        if (!invalidate) {
            session.willPassivate();
        }
    }
}
项目:simple-sparkjava-redis-session-manager    文件:PSF.java   
private void  addListenersIfItIsFirstRequest(Session session){
    if(firstRequest){
        for(EventListener l: listeners){
            ((AbstractSession)session.raw()).getSessionManager().addEventListener(l);
        }
    }
    firstRequest = false;
}
项目:nano-framework    文件:AbstractSessionManager.java   
@Override
protected final void addSession(final AbstractSession session) {
    if (isRunning()) {
        final String clusterId = getClusterId(session);
        sessions.put(clusterId, (Session) session);
        session.willPassivate();
        storeSession((Session) session);
        session.didActivate();
    }
}
项目:appengine-java-vm-runtime    文件:SessionManager.java   
/**
 * Call any session id listeners registered.
 * Usually done by renewSessionId() method, but that is not used in appengine.
 * @param session
 * @param oldId
 */
public void callSessionIdListeners (AbstractSession session, String oldId) {
  HttpSessionEvent event = new HttpSessionEvent(session);
  for (HttpSessionIdListener l:_sessionIdListeners)
  {
      l.sessionIdChanged(event, oldId);
  }
}
项目:nano-framework    文件:AbstractSessionManager.java   
public final void invalidateSession(final String clusterId) {
    final AbstractSession session = sessions.get(clusterId);
    if (session != null) {
        session.invalidate();
    }
}
项目:jetty-redis-session-management    文件:RedisSessionManager.java   
@Override
protected AbstractSession newSession(HttpServletRequest request) {
    return new RedisNoSqlSession(this, request);
}
项目:appengine-java-vm-runtime    文件:SessionManager.java   
@Override
protected void addSession(AbstractSession session) {
  // No list of sessions is kept in memory, so do nothing here.
}