|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.openeai.OpenEaiObject
|
+--org.openeai.afa.ScheduledApp
This component is used to wrap ScheduledApplications. It is similar to our PointToPointConsumer and PubSubConsumer messaging components. However, instead of consuming messages and executing commands based on the message it consumed, it 'sleeps' for a specified amount of time then wakes up and checks the Schedules it contains to see if the commands they manage should be executed. If so, it calls the execute method on each one of the commands associated to the Schedule it's currently checking.
| Field Summary |
| Fields inherited from class org.openeai.OpenEaiObject |
logger |
| Constructor Summary | |
ScheduledApp(ScheduledAppConfig sConfig)
Constructor |
|
| Method Summary | |
void |
addSchedule(java.lang.String name,
Schedule schedule)
Adds an individual Schedule to the list of schedules managed by this ScheduledApp. |
Schedule |
getSchedule(java.lang.String name)
Returns an individual Schedule from the list of schedules managed by this ScheduledApp. |
java.util.HashMap |
getSchedules()
Returns the list of Schedules managed by this ScheduledApp |
java.lang.String |
getType()
Returns the type of ScheduledApp that this is. |
void |
setThreadPool(ThreadPool tPool)
Sets the ThreadPool object associated to this ScheduledApp. |
| Methods inherited from class org.openeai.OpenEaiObject |
addLog4jProperty, getAppName, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ScheduledApp(ScheduledAppConfig sConfig)
throws EnterpriseConfigurationObjectException
| Method Detail |
public java.util.HashMap getSchedules()
public void addSchedule(java.lang.String name,
Schedule schedule)
public Schedule getSchedule(java.lang.String name)
public void setThreadPool(ThreadPool tPool)
public java.lang.String getType()
If the type is 'application' the ScheduledApp will retrieve all Schedules it manages and then call the execute methods on each command contained with those Schedules then exit.
If the type is 'triggered' the ScheduledApp will behave just like an 'application' except it will wait to be triggered before exiting. That is, some sort of 'kill' signal will have to be sent to the ScheduledApp. When that kill signal is received, it will exit.
If the type is 'daemon' the ScheduledApp will sleep for a specified period of time, then wake up and check each Schedule it manages and if that Schedule should be executed, it will call the execute method on each command managed by the Schedule.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||