Package org.apache.stratum.jcs.utils.servlet.session

Examples of org.apache.stratum.jcs.utils.servlet.session.MetaHttpSession


     *
     * @return The session value
     */
    public MetaHttpSession getSession( boolean create, HttpServletRequest req, HttpServletResponse res )
    {
        MetaHttpSession ses = getDistSession( req );
        return !ses.valid() && create ? createDistSession( req, res ) : ses;
    }
View Full Code Here


            gc.notifySession();
        }
        catch ( Exception e )
        {
            log.error( e );
            return new MetaHttpSession( session_id, null );
        }
        return new MetaHttpSession( session_id, sess );
    }
View Full Code Here

        String session_id = getRequestedSessionId( req );

        if ( session_id == null )
        {
            log.info( "no cookie found" );
            return new MetaHttpSession( null, null );
        }
        sess = new DistSession();

        if ( !sess.init( session_id ) )
        {
            return new MetaHttpSession( session_id, null );
        }
        long idleTime = System.currentTimeMillis() - sess.getLastAccessedTime();
        int max = sess.getMaxInactiveInterval();
        if ( idleTime > max / 2 )
        {
            if ( idleTime < max )
            {
                sess.access();
            }
            else
            {
                sessIdSet.remove( session_id );
                sess.invalidate();
                return new MetaHttpSession( session_id, null );
            }
        }
        return new MetaHttpSession( session_id, sess );
    }
View Full Code Here

TOP

Related Classes of org.apache.stratum.jcs.utils.servlet.session.MetaHttpSession

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.