|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openeai.OpenEaiObject
org.openeai.config.EnterpriseConfigurationObjectImpl
org.openeai.config.ScheduledAppConfig
public class ScheduledAppConfig
A ScheduledAppConfig is a wrapper class that takes information stored in an OpenEAI Deployment document (ScheduleAppConfig Element) and stores it in a Java object. Then the configuration object is passed to the constructor of the OpenEAI ScheduledApps and they are able to configure themselves with the information found in the config object.
Configuration Parameters:
These are the configuration parameters specified by the ScheduledAppConfig Element in the Deployment document. NOTE: Like all other OpenEAI configuration objects, there is a "container" level associated to ScheduledAppConfig objects. Many Elements and attributes are required at that level and may be optionally overridden at this level. This is to avoid having to enter redundant information in the Deployment document if all (or most) ScheduledAppConfig objects being configured should use the same configuration information. Therefore, many of the ScheduledApp configuration parameters are optional at this level but required at the "container" level. Where this is the case, it will be indicated by an "*".
| Name | Required | Description |
|---|---|---|
| name | yes | Name of the ScheduledApp being configured. This should be unique. |
| type (daemon | application | triggered) | no* | This parameter indicates what type of Scheduled application is being
started. Currently, there are three types:
|
| scheduleCheckInterval | no* | Time in milliseconds that the ScheduledApp should sleep between checking Schedules. If the Scheduled App is of type 'daemon' this is the amount of time between checking Schedules. If the app is of type 'application' or 'triggered' this is the initial amount of time the Scheduled App will sleep prior to executing the Schedules for the application. |
| ConfigClass | no* | Name of the configuration class that wraps the config Element (this class) |
| ObjectClass | yes | Name of the Java object that will be instantiated with this Config class (currently, org.openeai.afa.ScheduledApp) |
| ScheduleIdRepository | no | This elements allows you to specify where you would like the ScheduledApp to maintain
the list of Schedules it's processed. This is a persistent repository it uses to survive
being shutdown. When a 'daemon' Scheduled App executes a Schedule that has 'RunTimes' associated
to it, it keeps a record of that execution so it won't execute it again if the application
is restarted. This is all built into the Scheduled app foundation and is only applicable to
Scheduled applications that are of type 'daemon' and have Schedules with 'Runtimes' associated
to them.
By default, the file system is used to store this list of executed schedules. This repository is implemented in the org.openeai.afa.FileScheduleIdStore class. If no ScheduleIdRepository is specified, this repository will be used and the ScheduleIds will be written to a subdirectory called 'ScheduleIds' that is relevant to the location of execution. Another useful repository implementation is the org.openeai.afa.DbScheduleIdStore class which uses a simple database structure to store the ids associated to executed schedules. This is very useful if you need to run multiple instances of a Scheduled Application on multiple hosts and they don't all have access to the same file system resources. |
| ThreadPoolConfig | no* | Contains information that the ScheduledApp uses to initialize a ThreadPool object that it uses to execute ScheduledCommands associated to Schedules when they are met. |
| Schedules | yes | Contains configuration information related to all the Schedules that this ScheduledApp will at some time execute. A ScheduledApp may execute ScheduledCommands associated to many different Schedules in the same running process. See ScheduleConfig and the Schedule object for more information about this item. |
ScheduleConfig,
CommandConfig,
ScheduledApp,
Schedule,
ScheduledCommand,
ScheduleRuntime,
FileScheduleIdStore,
DbScheduleIdStore| Field Summary |
|---|
| Fields inherited from class org.openeai.OpenEaiObject |
|---|
logger |
| Constructor Summary | |
|---|---|
ScheduledAppConfig()
This is the constructor used by AppConfig to instantiate the config object. |
|
ScheduledAppConfig(org.jdom.Element configElement)
|
|
| Method Summary | |
|---|---|
void |
addScheduleConfig(java.lang.String name,
ScheduleConfig cConfig)
Adds a Schedule configuration object to the HashMap of ScheduleConfigs contained within this ScheduledApp. |
ScheduleConfig |
getScheduleConfig(java.lang.String name)
Returns a ScheduleConfig object for the name specified. |
java.util.HashMap |
getScheduleConfigs()
Returns a HashMap containing all Schedule configuration objects that will be used to intialize the Schedules associated to this ScheduledApp. |
ScheduleIdStore |
getScheduleIdStore()
|
ThreadPoolConfig |
getThreadPoolConfig()
Returns the ThreadPool configuration object that will be used to initialize the ThreadPool associated to the ScheduledApp. |
void |
init(org.jdom.Element configElement)
Implements the init(Element) method that all EnterpriseConfiguration objects must implement. |
void |
setScheduleIdStore(ScheduleIdStore store)
|
void |
setThreadPoolConfig(ThreadPoolConfig tConfig)
Sets the ThreadPool configuration object that will be used to initialize the ThreadPool associated to the ScheduledApp. |
| Methods inherited from class org.openeai.config.EnterpriseConfigurationObjectImpl |
|---|
addProperty, getAppName, getConfigDoc, getConfigElementByAttributeValue, getElementByAttributeValue, getName, getType, getValidation, refresh, setAppName, setConfigDoc, setName, setRefresh, setType, setValidation |
| Methods inherited from class org.openeai.OpenEaiObject |
|---|
getDebug, getFromAddr, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openeai.config.EnterpriseConfigurationObject |
|---|
getAppName, getProperties, refresh, setAppName |
| Constructor Detail |
|---|
public ScheduledAppConfig()
public ScheduledAppConfig(org.jdom.Element configElement)
throws EnterpriseConfigurationObjectException
EnterpriseConfigurationObjectException| Method Detail |
|---|
public java.util.HashMap getScheduleConfigs()
public void addScheduleConfig(java.lang.String name,
ScheduleConfig cConfig)
name - String the name of the Schedule that will be configured (also the key in the HashMap)cConfig - ScheduleConfig the Schedule's configuration object that will be used to initialize
the Schedule object.Schedule,
ScheduleConfigpublic ScheduleConfig getScheduleConfig(java.lang.String name)
name - String the name of the schedule
public void setThreadPoolConfig(ThreadPoolConfig tConfig)
tConfig - ThreadPoolConfigScheduledApp,
ThreadPoolpublic ThreadPoolConfig getThreadPoolConfig()
ScheduledApp,
ThreadPoolpublic void setScheduleIdStore(ScheduleIdStore store)
public ScheduleIdStore getScheduleIdStore()
public void init(org.jdom.Element configElement)
throws EnterpriseConfigurationObjectException
init in interface EnterpriseConfigurationObjectinit in class EnterpriseConfigurationObjectImplconfigElement - Element the configuration element that AppConfig has pulled from the configuration document
relevant to the ScheduledApp being configured. Or, the element that was found in the init() method.
EnterpriseConfigurationObjectException - if errors occur processing the configuration Element.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||