Each of the schedule methods takes an object extending the TimerTask class as its first parameter.
每个schedule方法都采用一个扩展了timertask类的对象作为自己的第一个参数。
The TimerTask class has a cancel method that you can use to cancel subsequent invocations of the task.
timertask类有一个cancel方法,可以用它取消对任务的后续调用。
With the Timer class, you can have a TimerTask that runs for a long time, blocking other tasks from running.
借助timer类,您可以拥有一个长时间运行的TimerTask,阻止其他任务运行。
The java.util.Timer and TimerTask classes provide convenient and relatively simple ways to execute tasks on a periodic or one-shot delayed basis.
Timer和timertask类提供了方便、相对简单的方法可在定期或一次性延迟的基础上执行任务。
Timer has a number of schedule() overloads, indicating whether a given task is to be one-shot or a repeating, and takes a TimerTask instance to fire.
Timer有许多schedule()重载,它们提示某一任务是一次性还是重复的,并且有一个启动的TimerTask实例。
As the preceding section mentioned, there's an issue with the use of Timer in JCA: the thread on which the TimerTask is executed is not under the application server's control.
正如前一小节提到过的,在JCA中,使用Timer有一个问题:执行TimerTask的线程不在应用服务器的控制之下。
As the preceding section mentioned, there's an issue with the use of Timer in JCA: the thread on which the TimerTask is executed is not under the application server's control.
正如前一小节提到过的,在JCA中,使用Timer有一个问题:执行TimerTask的线程不在应用服务器的控制之下。
应用推荐