Examples of DarkstarRunner


Examples of org.jdesktop.wonderland.modules.darkstar.api.weblib.DarkstarRunner

        throws ServletException, IOException
    {
        logger.info("User " + getUsername(request) + " restored snapshot " +
                    root.getRootPath());

        DarkstarRunner runner = getRunner();

        // make sure the runner is stopped
        SnapshotResult res = requestRestart(request, runner, "restore&root=" +
                                            getRootName(root));
        if (res != null) {
            return res;
        }

        // set the name
        runner.setWFSName(root.getRootPath());
        runner.forceColdstart();

        // complete the restart
        completeRestart(request, runner);
        return null;
    }
View Full Code Here

Examples of org.jdesktop.wonderland.modules.darkstar.api.weblib.DarkstarRunner

     * @return the current snapshot
     */
    protected WFSRoot getCurrentRoot(List<WFSRoot> roots,
                                     List<WFSSnapshot> snapshots)
    {
        DarkstarRunner dr = getRunner();
        if (dr == null) {
            return null;
        }

        System.out.println("Get current root: " + dr.getWFSName());

        if (dr.getWFSName() == null) {
            return EMPTY_WORLD;
        }

        for (WFSRoot root : roots) {
            if (root.getRootPath().equals(dr.getWFSName())) {
                return root;
            }
        }

        for (WFSRoot root : snapshots) {
            if (root.getRootPath().equals(dr.getWFSName())) {
                return root;
            }
        }

        // not found
View Full Code Here

Examples of org.jdesktop.wonderland.modules.darkstar.api.weblib.DarkstarRunner

       
            if (!(r instanceof DarkstarRunner)) {
                throw new RunnerException("Only Darkstar runner supported");
            }

            DarkstarRunner dr = (DarkstarRunner) r;

            if (action.equalsIgnoreCase("snapshot")) {
                if (nameParam == null) {
                    throw new RunnerException("Name is required");
                }
                dr.createSnapshot(nameParam);
            } else if (action.equalsIgnoreCase("setwfsname")) {
                if (nameParam == null) {
                    throw new RunnerException("Name is required");
                }
                dr.setWFSName(nameParam);
            } else if (action.equalsIgnoreCase("coldstart")) {
                dr.forceColdstart();
            } else {
                throw new RunnerException("Unkown action " + action);     
            }
           
            ResponseBuilder rb = Response.ok();
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.