Package java.util

Examples of java.util.TimerTask.cancel()


      field = BisocketClientInvoker.class.getDeclaredField("pingTimerTask");
      field.setAccessible(true);
      TimerTask pingTimerTask1 = (TimerTask) field.get(callbackClientInvoker);
      BisocketClientInvoker ci = (BisocketClientInvoker) client.getInvoker();
      assertNotNull(pingTimerTask1);
      pingTimerTask1.cancel();
     
      // Cause recreation of PingTimerTask on server.  If call below to
      // createControlConnection() doesn't throw an exception, then the test passes.
      Thread.sleep(waitPeriod);
      field = Client.class.getDeclaredField("callbackConnectors");
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

    }

    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

                    }
                    log.debug("Wait {} ms for shell to exit cleanly", timeout);
                    getSession().getFactoryManager().getScheduledExecutorService().schedule(task, timeout, TimeUnit.MILLISECONDS);
                    commandExitFuture.addListener(new SshFutureListener<CloseFuture>() {
                        public void operationComplete(CloseFuture future) {
                            task.cancel();
                        }
                    });
                }
                return commandExitFuture;
            }
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

        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

    }

    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

                Thread.sleep(1000);
            }
        }

        // 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

                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

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.