Examples of SessionValidator


Examples of com.volantis.mps.session.pool.SessionValidator

    private SessionValidator initializeSessionValidator(Map channelInfo)
            throws MessageException {

        // If MPS is communicating with the SMSC asynchronously then we
        // can't validate sessions.
        SessionValidator sessionValidator = null;
        if (!"async".equals(SMSCBindType)) {
            // Don't bother running the session validator if each
            // session is validated before it is used.
            if (!validateBeforeUse) {
                int sessionCheckingInterval = getIntValue(channelInfo,
                        VALIDATION_INTERVAL, false, SessionValidator.WAIT_FOREVER);
                LOGGER.info("session-validation-interval",
                        new Integer(sessionCheckingInterval));

                sessionValidator = new SessionValidator(
                        sessionPool, sessionCheckingInterval);
                Thread sessionCheckerThread = new Thread(sessionValidator,
                        "Thread-SessionValidator");
                sessionCheckerThread.start();
            }
View Full Code Here

Examples of org.apache.turbine.modules.actions.sessionvalidator.SessionValidator

            // initialization.  Certain services need RunData to initialize
            // themselves.
            init(data);

            // Get the instance of the Session Validator.
            SessionValidator sessionValidator = (SessionValidator)ActionLoader
                .getInstance().getInstance(TurbineResources.getString(
                    "action.sessionvalidator"));

            // if this is the redirected stage of the initial request,
            // check that the session is now not new.
            // If it is not, then redirect back to the
            // original URL (i.e. remove the "redirected" pathinfo)
            if (data.getParameters()
                .getString(REDIRECTED_PATHINFO_NAME, "false").equals("true"))
            {
                if (data.getSession().isNew())
                {
                    String message = "Infinite redirect detected...";
                    log(message);
                    Log.error(message);
                    throw new Exception(message);
                }
                else
                {
                    DynamicURI duri = new DynamicURI (data, true);

                    // Pass on the sent data in pathinfo.
                    for (Enumeration e = data.getParameters().keys() ;
                         e.hasMoreElements() ;)
                    {
                        String key = (String) e.nextElement();
                        if (!key.equals(REDIRECTED_PATHINFO_NAME))
                        {
                            String value =
                                (String) data.getParameters().getString ( key );
                            duri.addPathInfo((String)key, (String)value );
                        }
                    }

                    data.getResponse().sendRedirect( duri.toString() );
                    return;
                }
            }
            else
            {
                // Insist that the client starts a session before access
                // to data is allowed. this is done by redirecting them to
                // the "screen.homepage" page but you could have them go
                // to any page as a starter (ie: the homepage)
                // "data.getResponse()" represents the HTTP servlet
                // response.
                if ( sessionValidator.requiresNewSession(data) &&
                     data.getSession().isNew() )
                {
                    DynamicURI duri = new DynamicURI (data, true);

                    // Pass on the sent data in pathinfo.
View Full Code Here

Examples of org.apache.turbine.modules.actions.sessionvalidator.SessionValidator

    {
        if (rundata == null)
            throw new NullPointerException("rundata is null");
       
        // Get the instance of the Session Validator.
        SessionValidator sessionValidator = (SessionValidator)ActionLoader
             .getInstance().getInstance(TurbineResources.getString(
                 "action.sessionvalidator"));
        if (sessionValidator == null)
            throw new NullPointerException("Failed to get a SessonValidator");
View Full Code Here

Examples of org.apache.turbine.modules.actions.sessionvalidator.SessionValidator

    {
        if (rundata == null)
            throw new NullPointerException("rundata is null");
       
        // Get the instance of the Session Validator.
        SessionValidator sessionValidator = (SessionValidator)ActionLoader
             .getInstance().getInstance(TurbineResources.getString(
                 "action.sessionvalidator"));
        if (sessionValidator == null)
            throw new NullPointerException("Failed to get a SessonValidator");
View Full Code Here

Examples of org.apache.turbine.modules.actions.sessionvalidator.SessionValidator

            // initialization.  Certain services need RunData to initialize
            // themselves.
            init(data);

            // Get the instance of the Session Validator.
            SessionValidator sessionValidator = (SessionValidator)ActionLoader
                .getInstance().getInstance(TurbineResources.getString(
                    "action.sessionvalidator"));

            // if this is the redirected stage of the initial request, check that
            // the session is now not new. If it is not, then redirect back to the
            // original URL (i.e. remove the "redirected" pathinfo)
            if (data.getParameters().getString(REDIRECTED_PATHINFO_NAME, "false")
                    .equals("true"))
            {
                if (data.getSession().isNew())
                {
                    String message = "Infinite redirect detected...";
                    log(message);
                    Log.error(message);
                    throw new Exception(message);
                }
                else
                {
                    DynamicURI duri = new DynamicURI (data, true);

                    // Pass on the sent data in pathinfo.
                    for (Enumeration e = data.getParameters().keys() ;
                         e.hasMoreElements() ;)
                    {
                        String key = (String) e.nextElement();
                        if (!key.equals(REDIRECTED_PATHINFO_NAME))
                        {
                            String value =
                                (String) data.getParameters().getString ( key );
                            duri.addPathInfo((String)key, (String)value );
                        }
                    }

                    data.getResponse().sendRedirect( duri.toString() );
                    return;
                }
            }
            else
            {
                // Insist that the client starts a session before access
                // to data is allowed. this is done by redirecting them to
                // the "screen.homepage" page but you could have them go
                // to any page as a starter (ie: the homepage)
                // "data.getResponse()" represents the HTTP servlet
                // response.
                if ( sessionValidator.requiresNewSession(data) &&
                        data.getSession().isNew() )
                {
                    DynamicURI duri = new DynamicURI (data, true);

                    // Pass on the sent data in pathinfo.
View Full Code Here

Examples of org.apache.turbine.modules.actions.sessionvalidator.SessionValidator

            // initialization.  Certain services need RunData to initialize
            // themselves.
            init(data);

            // Get the instance of the Session Validator.
            SessionValidator sessionValidator = (SessionValidator)ActionLoader
                .getInstance().getInstance(TurbineResources.getString(
                    "action.sessionvalidator"));

            // if this is the redirected stage of the initial request,
            // check that the session is now not new.
            // If it is not, then redirect back to the
            // original URL (i.e. remove the "redirected" pathinfo)
            if (data.getParameters()
                .getString(REDIRECTED_PATHINFO_NAME, "false").startsWith("true"))
            {
                if (data.getSession().isNew())
                {
                    String message = "Infinite redirect detected...";
                    log(message);
                    Log.error(message);
                    throw new Exception(message);
                }
                else
                {
                    DynamicURI duri = new DynamicURI (data, true);

                    // Pass on the sent data in pathinfo.
                    for (Enumeration e = data.getParameters().keys() ;
                         e.hasMoreElements() ;)
                    {
                        String key = (String) e.nextElement();
                        if (!key.equals(REDIRECTED_PATHINFO_NAME))
                        {
                            String value =
                                (String) data.getParameters().getString ( key );
                            duri.addPathInfo((String)key, (String)value );
                        }
                    }

                    data.getResponse().sendRedirect( duri.toString() );
                    return;
                }
            }
            else
            {
                // Insist that the client starts a session before access
                // to data is allowed. this is done by redirecting them to
                // the "screen.homepage" page but you could have them go
                // to any page as a starter (ie: the homepage)
                // "data.getResponse()" represents the HTTP servlet
                // response.
                if ( sessionValidator.requiresNewSession(data) &&
                     data.getSession().isNew() )
                {
                    DynamicURI duri = new DynamicURI (data, true);

                    // Pass on the sent data in pathinfo.
View Full Code Here

Examples of org.apache.turbine.modules.actions.sessionvalidator.SessionValidator

            // initialization.  Certain services need RunData to initialize
            // themselves.
            init(data);

            // Get the instance of the Session Validator.
            SessionValidator sessionValidator = (SessionValidator)ActionLoader
                .getInstance().getInstance(TurbineResources.getString(
                    "action.sessionvalidator"));

            // if this is the redirected stage of the initial request,
            // check that the session is now not new.
            // If it is not, then redirect back to the
            // original URL (i.e. remove the "redirected" pathinfo)
            if (data.getParameters()
                .getString(REDIRECTED_PATHINFO_NAME, "false").equals("true"))
            {
                if (data.getSession().isNew())
                {
                    String message = "Infinite redirect detected...";
                    log(message);
                    Log.error(message);
                    throw new Exception(message);
                }
                else
                {
                    DynamicURI duri = new DynamicURI (data, true);

                    // Pass on the sent data in pathinfo.
                    for (Enumeration e = data.getParameters().keys() ;
                         e.hasMoreElements() ;)
                    {
                        String key = (String) e.nextElement();
                        if (!key.equals(REDIRECTED_PATHINFO_NAME))
                        {
                            String value =
                                (String) data.getParameters().getString ( key );
                            duri.addPathInfo((String)key, (String)value );
                        }
                    }

                    data.getResponse().sendRedirect( duri.toString() );
                    return;
                }
            }
            else
            {
                // Insist that the client starts a session before access
                // to data is allowed. this is done by redirecting them to
                // the "screen.homepage" page but you could have them go
                // to any page as a starter (ie: the homepage)
                // "data.getResponse()" represents the HTTP servlet
                // response.
                if ( sessionValidator.requiresNewSession(data) &&
                     data.getSession().isNew() )
                {
                    DynamicURI duri = new DynamicURI (data, true);

                    // Pass on the sent data in pathinfo.
View Full Code Here

Examples of org.apache.turbine.modules.actions.sessionvalidator.SessionValidator

            // initialization.  Certain services need RunData to initialize
            // themselves.
            init(data);

            // Get the instance of the Session Validator.
            SessionValidator sessionValidator = (SessionValidator)ActionLoader
                .getInstance().getInstance(TurbineResources.getString(
                    "action.sessionvalidator"));

            // if this is the redirected stage of the initial request,
            // check that the session is now not new.
            // If it is not, then redirect back to the
            // original URL (i.e. remove the "redirected" pathinfo)
            if (data.getParameters()
                .getString(REDIRECTED_PATHINFO_NAME, "false").equals("true"))
            {
                if (data.getSession().isNew())
                {
                    String message = "Infinite redirect detected...";
                    log(message);
                    Log.error(message);
                    throw new Exception(message);
                }
                else
                {
                    DynamicURI duri = new DynamicURI (data, true);

                    // Pass on the sent data in pathinfo.
                    for (Enumeration e = data.getParameters().keys() ;
                         e.hasMoreElements() ;)
                    {
                        String key = (String) e.nextElement();
                        if (!key.equals(REDIRECTED_PATHINFO_NAME))
                        {
                            String value =
                                (String) data.getParameters().getString ( key );
                            duri.addPathInfo((String)key, (String)value );
                        }
                    }

                    data.getResponse().sendRedirect( duri.toString() );
                    return;
                }
            }
            else
            {
                // Insist that the client starts a session before access
                // to data is allowed. this is done by redirecting them to
                // the "screen.homepage" page but you could have them go
                // to any page as a starter (ie: the homepage)
                // "data.getResponse()" represents the HTTP servlet
                // response.
                if ( sessionValidator.requiresNewSession(data) &&
                     data.getSession().isNew() )
                {
                    DynamicURI duri = new DynamicURI (data, true);

                    // Pass on the sent data in pathinfo.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.