@Deprecated
public class ScheduledTimerListener
extends java.lang.Object
JavaBean that describes a scheduled TimerListener, consisting of
the TimerListener itself (or a Runnable to create a TimerListener for)
and a delay plus period. Period needs to be specified;
there is no point in a default for it.
The CommonJ TimerManager does not offer more sophisticated scheduling
options such as cron expressions. Consider using Quartz for such
advanced needs.
Note that the TimerManager uses a TimerListener instance that is
shared between repeated executions, in contrast to Quartz which
instantiates a new Job for each execution.
public void setTimerListener(@Nullable
commonj.timers.TimerListener timerListener)
Deprecated.
Set the TimerListener to schedule.
getTimerListener
@Nullable
public commonj.timers.TimerListener getTimerListener()
Deprecated.
Return the TimerListener to schedule.
setDelay
public void setDelay(long delay)
Deprecated.
Set the delay before starting the task for the first time,
in milliseconds. Default is 0, immediately starting the
task after successful scheduling.
If the "firstTime" property is specified, this property will be ignored.
Specify one or the other, not both.
getDelay
public long getDelay()
Deprecated.
Return the delay before starting the job for the first time.
setPeriod
public void setPeriod(long period)
Deprecated.
Set the period between repeated task executions, in milliseconds.
Default is -1, leading to one-time execution. In case of zero or a
positive value, the task will be executed repeatedly, with the given
interval in-between executions.
Note that the semantics of the period value vary between fixed-rate
and fixed-delay execution.
Note: A period of 0 (for example as fixed delay) is
supported, because the CommonJ specification defines this as a legal value.
Hence a value of 0 will result in immediate re-execution after a job has
finished (not in one-time execution like with java.util.Timer).