Class SchedulerConstants
java.lang.Object
net.solarnetwork.central.scheduler.SchedulerConstants
Constants for the Scheduler API.
The scheduler works by sending OSGi EventAdmin events. Post a
TOPIC_JOB_REQUEST event to schedule a job. The job will run at the
time specified by the JOB_DATE property, triggering a new event
using the topic specified by the request JOB_TOPIC property.
When the job executes, it will expect an acknowledgment event to be posted,
either TOPIC_JOB_COMPLETE or TOPIC_JOB_FAILURE, so the job
can tell if the work was executed or not. The job will wait at most
JOB_MAX_WAIT milliseconds (using a default value if this is not
specified on the job request), after which it will time out.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA cron expression to run the job with, instead of a specific date.static final StringA Long that represents the exact date to run the job at.static final StringA Throwable to associate with a (failed) job.static final StringAn optional group to schedule the job with.static final StringA unique ID for the job.static final StringA Long representing the maximum number of milliseconds to wait for the job to complete.static final StringA java.util.Map of properties to associate with the job.static final StringThe OSGi Event topic to use for the job notification.static final StringTopic for a job complete notification.static final StringTopic for a job failure notification.static final StringTopic for a job request notification.static final StringTopic of event sent when scheduler ready. -
Method Summary
-
Field Details
-
TOPIC_JOB_REQUEST
Topic for a job request notification.- See Also:
-
TOPIC_JOB_COMPLETE
Topic for a job complete notification.- See Also:
-
TOPIC_JOB_FAILURE
Topic for a job failure notification.- See Also:
-
TOPIC_SCHEDULER_READY
Topic of event sent when scheduler ready.- See Also:
-
JOB_ID
A unique ID for the job.- See Also:
-
JOB_GROUP
An optional group to schedule the job with.- See Also:
-
JOB_TOPIC
The OSGi Event topic to use for the job notification.- See Also:
-
JOB_DATE
A Long that represents the exact date to run the job at.- See Also:
-
JOB_PROPERTIES
A java.util.Map of properties to associate with the job.- See Also:
-
JOB_EXCEPTION
A Throwable to associate with a (failed) job.- See Also:
-
JOB_MAX_WAIT
A Long representing the maximum number of milliseconds to wait for the job to complete.- See Also:
-
JOB_CRON_EXPRESSION
A cron expression to run the job with, instead of a specific date.- See Also:
-