|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.config.timer.TimerTask
public class TimerTask
Scheduled task.
Constructor Summary | |
---|---|
TimerTask(TimeoutInvoker invoker,
java.lang.Runnable task,
CronExpression cronExpression,
Trigger trigger,
java.io.Serializable data)
Constructs a new scheduled task. |
Method Summary | |
---|---|
void |
cancel()
Cancels the scheduled task. |
boolean |
equals(java.lang.Object object)
Checks for equality with another object. |
CronExpression |
getCronExpression()
Gets the cron expression used to create the schedule. |
java.io.Serializable |
getData()
Gets the data to be passed to the invocation target. |
long |
getNextAlarmTime()
Get the next time, in milliseconds, when the alarm will be triggered for the scheduled task. |
ScheduledTaskStatus |
getStatus()
Gets the current status of this task. |
long |
getTaskId()
Gets task ID. |
void |
handleAlarm(Alarm alarm)
Handles alarm. |
int |
hashCode()
Gets the hash code for this object. |
void |
invoke(Timer timer)
|
void |
start()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimerTask(TimeoutInvoker invoker, java.lang.Runnable task, CronExpression cronExpression, Trigger trigger, java.io.Serializable data)
targetBean
- The target bean to be invoked by the task.targetMethod
- The target method to be invoked by the task.task
- The task to be invoked.cronExpression
- The cron expression used to create the schedule, if any.trigger
- The trigger for the schedule.start
- The start date, in milliseconds for the scheduled task. -1 used to
indicate no start date.end
- The end date, in milliseconds for the scheduled task. -1 used to
indicate no end date.data
- The data to be passed to the invocation target.Method Detail |
---|
public void start()
public long getTaskId()
public CronExpression getCronExpression()
public java.io.Serializable getData()
public long getNextAlarmTime()
public void cancel()
public ScheduledTaskStatus getStatus()
public void invoke(Timer timer)
public void handleAlarm(Alarm alarm)
handleAlarm
in interface AlarmListener
alarm
- Alarm to handle.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- The object to compare with.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |