|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCollectJob
public abstract class CollectJob
Basic data collection job, implementing basic configuration handling and collection routines.
Field Summary | |
---|---|
private static org.slf4j.Logger |
_log
|
protected String |
date
|
protected String |
form_date
|
protected String |
form_hday
|
protected String |
form_time
|
protected ArrayList<Object> |
hday
|
protected Integer |
hour_stop
|
protected Integer |
hour_strt
|
protected Integer |
mnte_stop
|
protected Integer |
mnte_strt
|
protected Integer |
scnd_stop
|
protected Integer |
scnd_strt
|
protected String |
time
|
protected String |
time_zone
|
Constructor Summary | |
---|---|
CollectJob()
Constructor. |
Method Summary | |
---|---|
protected abstract void |
collect()
Collects data from a specific source. |
private boolean |
configure(org.quartz.JobExecutionContext context)
Configures the CollectJob component by parsing a configuration
file. |
protected abstract boolean |
configureLocal(String jobKey)
Configures the CollectJob component by parsing a configuration file for local
component elements. |
private boolean |
configureShared()
Configures the CollectJob component by parsing a configuration file for shared market
elements. |
void |
execute(org.quartz.JobExecutionContext context)
Executes the tasks of the CollectJob component. |
protected abstract org.slf4j.Logger |
getLogger()
Retrieves the Logger of the component. |
private boolean |
isHoliday(Calendar date_now)
Checks whether it is a holiday. |
private boolean |
isMarket(Calendar date_now)
Checks whether the market is open. |
private boolean |
isTime(Calendar date_now)
Checks whether it is a trading time. |
private boolean |
isWeekend(Calendar date_now)
Checks whether it is a weekend. |
private boolean |
load(org.quartz.JobExecutionContext context)
Configures the CollectJob component by loading configurations stored in a
JobDataMap , which is available during runtime of the component. |
protected abstract boolean |
loadLocal(org.quartz.JobExecutionContext context)
Configures the CollectJob component by loading configurations for local component
elements stored in a JobDataMap , which is available during runtime of the
component. |
private boolean |
loadShared(org.quartz.JobExecutionContext context)
Configures the CollectJob component by loading configurations for shared market
elements stored in a JobDataMap , which is available during runtime of the
component. |
private void |
store(org.quartz.JobExecutionContext context)
Stores the configuration of the CollectJob component in a
JobDataMap , which is available during runtime of the component. |
protected abstract void |
storeLocal(org.quartz.JobExecutionContext context)
Stores the configuration for local component elements of the CollectJob component in
a JobDataMap , which is available during runtime of the component. |
private void |
storeShared(org.quartz.JobExecutionContext context)
Stores the configuration for shared market elements of the CollectJob component in a
JobDataMap , which is available during runtime of the component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ArrayList<Object> hday
protected Integer hour_stop
protected Integer hour_strt
protected Integer mnte_stop
protected Integer mnte_strt
protected Integer scnd_stop
protected Integer scnd_strt
protected String date
protected String form_date
protected String form_hday
protected String form_time
protected String time
protected String time_zone
private static org.slf4j.Logger _log
Constructor Detail |
---|
public CollectJob()
Method Detail |
---|
private boolean configure(org.quartz.JobExecutionContext context)
CollectJob
component by parsing a configuration
file. Configurations are stored in a JobDataMap
, which is available during
runtime of the component.
context
- Execution context of the component.
Boolean
value indicating whether parsed configuration is valid.private boolean configureShared()
CollectJob
component by parsing a configuration file for shared market
elements.
Boolean
value indicating whether parsed configuration is valid.private boolean load(org.quartz.JobExecutionContext context)
CollectJob
component by loading configurations stored in a
JobDataMap
, which is available during runtime of the component.
context
- Execution context of the component.
Boolean
value indicating whether loaded configuration is valid.private boolean loadShared(org.quartz.JobExecutionContext context)
CollectJob
component by loading configurations for shared market
elements stored in a JobDataMap
, which is available during runtime of the
component.
context
- Execution context of the component.
Boolean
value indicating whether loaded configuration is valid.private void store(org.quartz.JobExecutionContext context)
CollectJob
component in a
JobDataMap
, which is available during runtime of the component.
context
- Execution context of the component.private void storeShared(org.quartz.JobExecutionContext context)
CollectJob
component in a
JobDataMap
, which is available during runtime of the component.
context
- Execution context of the component.public void execute(org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
CollectJob
component.
execute
in interface org.quartz.Job
context
- Execution context of the component.
org.quartz.JobExecutionException
- An exception that indicates to the scheduler that an error
occurred while executing, and whether or not the component requests to be
re-fired immediately, or whether it wants to be unscheduled.private boolean isMarket(Calendar date_now)
date_now
- The date to be checked.
Boolean
value indicating whether the market is open.private boolean isWeekend(Calendar date_now)
date_now
- The date to be checked.
Boolean
value indicating whether it is a weekend.private boolean isHoliday(Calendar date_now)
date_now
- The date to be checked.
Boolean
value indicating whether it is a holiday.private boolean isTime(Calendar date_now)
date_now
- The date to be checked.
Boolean
value indicating whether it is a trading time.protected abstract void collect()
protected abstract boolean configureLocal(String jobKey)
CollectJob
component by parsing a configuration file for local
component elements.
jobKey
- ID of the component.
Boolean
value indicating whether parsed configuration is valid.protected abstract boolean loadLocal(org.quartz.JobExecutionContext context)
CollectJob
component by loading configurations for local component
elements stored in a JobDataMap
, which is available during runtime of the
component.
context
- Execution context of the component.
Boolean
value indicating whether loaded configuration is valid.protected abstract org.slf4j.Logger getLogger()
Logger
of the component.
Logger
used for logging system output.protected abstract void storeLocal(org.quartz.JobExecutionContext context)
CollectJob
component in
a JobDataMap
, which is available during runtime of the component.
context
- Execution context of the component.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |