|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.opensync.schedule.Scheduler
The scheduler class is used to schedule Runnable object
It can schedule by date like the cron table of unix system
It also can start a Runnable object on a http request
SchedulerEntry,
Serialized Form| Field Summary | |
protected int |
httpPort
The listening port for http request |
protected java.util.Hashtable |
schedulerEntries
All the SchedulerEntry schedule by http request |
protected java.util.TreeSet |
timeSchedulerEntries
All the SchedulerEntry schedule by time |
| Constructor Summary | |
Scheduler(int httpPort)
Construct the Scheduler |
|
| Method Summary | |
void |
addSchedulerEntry(SchedulerEntry schedulerEntry)
Add a SchedulerEntry |
void |
execute(java.lang.Runnable runnable)
Execute the Runnable object |
void |
execute(java.lang.String entry)
Execute the Runnable object of the a
SchedulerEntry by its name, use for http schedule |
static void |
main(java.lang.String[] args)
Use for debug only |
void |
run()
Implements the Runnable interface |
void |
setExitApp(boolean exitApp)
|
void |
start()
Start scheduling |
java.lang.String |
toString()
Used for debug only |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.util.TreeSet timeSchedulerEntries
SchedulerEntry schedule by time
protected java.util.Hashtable schedulerEntries
SchedulerEntry schedule by http request
protected int httpPort
| Constructor Detail |
public Scheduler(int httpPort)
httpPort - the listening port for http schedule| Method Detail |
public void setExitApp(boolean exitApp)
public void start()
throws java.io.IOException
java.io.IOExceptionpublic void addSchedulerEntry(SchedulerEntry schedulerEntry)
SchedulerEntry
schedulerEntry - the schedulerEntry to addSchedulerEntrypublic java.lang.String toString()
public void run()
Runnable interface
run in interface java.lang.Runnablepublic void execute(java.lang.String entry)
Runnable object of the a
SchedulerEntry by its name, use for http schedule
entry - the name of the SchedulerEntry to executepublic void execute(java.lang.Runnable runnable)
Runnable object
runnable - public static void main(java.lang.String[] args)
args - the comman args
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||