Package com.adito.tasks.timer

Examples of com.adito.tasks.timer.StoppableTimer.schedule()


    }

    private void doShutdown(HttpServletRequest request, ShutdownForm shutdownForm, final boolean restart) {
        StoppableTimer timer = (StoppableTimer) CoreServlet.getServlet().getServletContext().getAttribute(StoppableTimer.NAME);
        ShutdownTimerTask stt = new ShutdownTimerTask(restart, Integer.parseInt(shutdownForm.getShutdownDelay()));
        timer.schedule(ShutdownTimerTask.NAME, stt, stt.getDelay());
        GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.ALL_USERS, new BundleActionMessage("setup",
            "shutdown.global.warning.message",
            stt.getShutDownTimeString()), DismissType.NO_DISMISS));
        request.getSession().setAttribute(Constants.RESTARTING, Boolean.valueOf(restart));
    }
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.