com.stc.connector.tcpip.model.schedule
Class TimerTaskScheduler
java.lang.Object
com.stc.connector.tcpip.model.schedule.TimerTaskScheduler
- All Implemented Interfaces:
- Scheduler
public class TimerTaskScheduler
- extends java.lang.Object
- implements Scheduler
RA task scheduler (based on Timer Service) for exchange/communication.
- Version:
- cvs revision: $Revision: 1.5 $ Last Modified: $Date: 2008/03/03 15:36:00 $
- Author:
- Harry Liu
Field Summary |
static java.lang.String |
version
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
version
public static final java.lang.String version
- See Also:
- Constant Field Values
TimerTaskScheduler
public TimerTaskScheduler(java.util.Timer timer,
Schedule schedule)
throws java.lang.IllegalArgumentException
- Constructor for TimerTaskScheduler.
If the passed-in schedule is with a positive repeatedPeriod,
the task will be treated as a repeatedSchedule, so the task
will be executed repeatedly;
If the passed-in schedule is with a non-positive repeatedPeriod,
the task will be treated as an onetimeSchedule, so the task
will be executed one time.
- Parameters:
timer
- Timerschedule
- Schedule
- Throws:
java.lang.IllegalArgumentException
- on error
schedule
public void schedule(java.util.TimerTask timerTask)
- Method schedule.
- Parameters:
timerTask
- TimerTask
schedule
public void schedule(Task task)
- Specified by:
schedule
in interface Scheduler
- Parameters:
task
- task to schedule- See Also:
Scheduler.schedule(com.stc.connector.tcpip.model.schedule.Task)
cancel
public void cancel()
- Specified by:
cancel
in interface Scheduler
- See Also:
Scheduler.cancel()