Package org.quartz.plugins.xml
Class XMLSchedulingDataProcessor
java.lang.Object
org.quartz.plugins.xml.XMLSchedulingDataProcessor
- All Implemented Interfaces:
ErrorHandler
Parses an XML file that declares Jobs and their schedules (Triggers), and processes the related
data.
- Since:
- Quartz 1.8
- Author:
- James House, Past contributions from Chris Bonham, Past contributions from pl47ypus, timmolter
-
Field Summary
-
Constructor Summary
ConstructorDescriptionXMLSchedulingDataProcessor
(ClassLoadHelper classLoadHelper) Constructor for JobSchedulingDataLoader. -
Method Summary
Modifier and TypeMethodDescriptionvoid
ErrorHandler interface.void
ErrorHandler interface.protected Boolean
getBoolean
(XPath xpathToElement, String elementName, Node parentNode) void
processFile
(String fileName, boolean failOnFileNotFound) Process the xml file in the given location, and schedule all of the jobs defined within it.void
scheduleJobs
(Scheduler sched) Schedules the given sets of jobs and triggers.void
ErrorHandler interface.
-
Field Details
-
QUARTZ_XML_DEFAULT_FILE_NAME
- See Also:
-
-
Constructor Details
-
XMLSchedulingDataProcessor
public XMLSchedulingDataProcessor(ClassLoadHelper classLoadHelper) throws ParserConfigurationException Constructor for JobSchedulingDataLoader.- Parameters:
classLoadHelper
-clh
- class-loader helper to share with digester.- Throws:
ParserConfigurationException
- if the XML parser cannot be configured as needed.
-
-
Method Details
-
processFile
Process the xml file in the given location, and schedule all of the jobs defined within it.- Parameters:
fileName
- meta data file name.- Throws:
Exception
-
getBoolean
protected Boolean getBoolean(XPath xpathToElement, String elementName, Node parentNode) throws XPathExpressionException - Throws:
XPathExpressionException
-
scheduleJobs
Schedules the given sets of jobs and triggers.- Parameters:
sched
- job scheduler.- Throws:
SchedulerException
- if the Job or Trigger cannot be added to the Scheduler, or there is an internal Scheduler error.
-
warning
ErrorHandler interface. Receive notification of a warning.- Specified by:
warning
in interfaceErrorHandler
- Parameters:
e
- The error information encapsulated in a SAX parse exception.- Throws:
SAXException
- Any SAX exception, possibly wrapping another exception.
-
error
ErrorHandler interface. Receive notification of a recoverable error.- Specified by:
error
in interfaceErrorHandler
- Parameters:
e
- The error information encapsulated in a SAX parse exception.- Throws:
SAXException
- Any SAX exception, possibly wrapping another exception.
-
fatalError
ErrorHandler interface. Receive notification of a non-recoverable error.- Specified by:
fatalError
in interfaceErrorHandler
- Parameters:
e
- The error information encapsulated in a SAX parse exception.- Throws:
SAXException
- Any SAX exception, possibly wrapping another exception.
-