com.jarretttaylor.cron.xml
Class XmlCron

java.lang.Object
  extended by java.lang.Thread
      extended by com.jarretttaylor.cron.Cron
          extended by com.jarretttaylor.cron.xml.XmlCron
All Implemented Interfaces:
java.lang.Runnable

public class XmlCron
extends Cron

Author:
Jarrett Taylor

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
XmlCron(org.w3c.dom.Document document, boolean fork)
          creates a new Cron scheduler with the supplied document.
XmlCron(java.lang.String uri, boolean fork)
          creates a new Cron scheduler with the supplied uri by parsing the document and calling the (Document document, boolean fork) constructor.
 
Method Summary
 void reload(org.w3c.dom.Document document, boolean terminateRunningJobs)
          Reloads the cron settings with the supplied document.
 void reload(java.lang.String uri, boolean terminateRunningJobs)
          Reloads the cron settings with the supplied file uri by parsing the document and calling the (Document document, boolean terminateRunningJobs) method.
 
Methods inherited from class com.jarretttaylor.cron.Cron
disable, disableCronJob, enable, enableCronJob, forceRunCronJob, getCronJobs, isDisabled, isProcessing, reload, reset, run, setFirstRun, terminate, terminateCronJob
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlCron

public XmlCron(java.lang.String uri,
               boolean fork)
creates a new Cron scheduler with the supplied uri by parsing the document and calling the (Document document, boolean fork) constructor.

Parameters:
uri - filename of the xml cron document to parse
fork - if true, frees the calling thread to return

XmlCron

public XmlCron(org.w3c.dom.Document document,
               boolean fork)
creates a new Cron scheduler with the supplied document. This constructor assumes that the document has already been validated against the DTD.

Parameters:
document - Document representation of cron file to parse
fork - if true, frees the calling thread to return
Method Detail

reload

public void reload(java.lang.String uri,
                   boolean terminateRunningJobs)
Reloads the cron settings with the supplied file uri by parsing the document and calling the (Document document, boolean terminateRunningJobs) method. result of the reload.

Parameters:
uri - filename of cron file to parse
terminateRunningJobs - if true, it will attempt to terminate any curretnly running jobs

reload

public void reload(org.w3c.dom.Document document,
                   boolean terminateRunningJobs)
Reloads the cron settings with the supplied document. This method assumes that the document has already been validated against the DTD.

Parameters:
document - cron document object
terminateRunningJobs - if true, it will attempt to terminate any currently running jobs