Examples of SunShine


Examples of org.apache.cocoon.sunshine.SunShine

                   SourceResolver resolver,
                   Map objectModel,
                   String source,
                   Parameters par)
    throws ProcessingException {
        SunShine sunShine = null;
        try {
            sunShine = (SunShine)this.manager.lookup(SunShine.ROLE);
            final String action = par.getParameter("action", "create");
            if ( action.equals("create") == true ) {
                sunShine.createSession();
            } else if ( action.equals("terminate") == true ) {
                final String mode = par.getParameter("mode", "immediately");
                if ( mode.equals("immediately") == true) {
                    sunShine.terminateSession(true);
                } else if ( mode.equals("if-unused") == true ) {
                    sunShine.terminateSession(false);
                } else {
                    throw new ProcessingException("Unknown mode " + mode + " for action " + action);
                }
            } else {
                throw new ProcessingException("Unknown action: " + action);
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.