Package java.util

Examples of java.util.TimerTask.cancel()


     * @param service the service for which the timer task should be cancelled
     */
    public void cancelPoll(AxisService service) {
        TimerTask task = (TimerTask) serviceToTimerTaskMap.get(service);
        if (task != null) {
            task.cancel();
        }
    }

    public void onPoll() {}

View Full Code Here


    private void cancelAllTimerTasks() {
        try {
            int size = scheduledTimerTasks.size();
            for (int i = 0; i < size; i++) {
                TimerTask task = (TimerTask) scheduledTimerTasks.get(i);
                task.cancel();
            }
        } catch (Exception ex) {
        }  finally {
            scheduledTimerTasks.clear();
        }
View Full Code Here

    }

    public static synchronized void cancel(Runnable task) {
      TimerTask ticket = TIMER_TASKS.remove(task);
        if (ticket != null) {
            ticket.cancel();
            CLOCK_DAEMON.purge();//remove cancelled TimerTasks
        }
    }

    public static void executeAfterDelay(final Runnable task, long redeliveryDelay) {
View Full Code Here

                } else {
                    Thread.sleep(verifyWaitDelay);
                }
            }

            timeoutTask.cancel();
        }

        out.println(name + " started in " + watch);
        //System.console().flush();
View Full Code Here

                Thread.sleep(1000);

            }
        }
        if (started) {
            timeoutTask.cancel();
            timer.cancel();
        }

        println("Geronimo server is started");
        return null;
View Full Code Here

            }
        }
        server.closeConnection();

        // Stop the timer, server should be up now
        timeoutTask.cancel();

        log.info("Geronimo server started in " + watch);

        if (!background) {
            log.info("Waiting for Geronimo server to shutdown...");
View Full Code Here

            }
        }
        server.closeConnection();

        // Stop the timer, server should be up now
        timeoutTask.cancel();

        log.info("Geronimo server started");
    }

    protected String getFullClassName() {
View Full Code Here

                Thread.sleep(1000);
            }
        }

        // Stop the timer, server should be up now
        timeoutTask.cancel();
       
        log.info("Geronimo server started");

        if (!background) {
            log.info("Waiting for Geronimo server to shutdown...");
View Full Code Here

                Thread.sleep(1000);
            }
        }

        // Stop the timer, server should be up now
        timeoutTask.cancel();

        log.info("Geronimo server started");
    }

    protected String getFullClassName() {
View Full Code Here

        for (Iterator iterator = ids.iterator(); iterator.hasNext();) {
            Long idLong = (Long) iterator.next();
            WorkInfo workInfo = getWorkInfo(idLong);
            if (workInfo != null) {
                TimerTask timerTask = workInfo.getExecutorFeedingTimerTask();
                timerTask.cancel();
            }
        }
    }

    void addWorkInfo(WorkInfo worker) {
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.