com.raritantechnologies.searchApp.scheduler
Class OnDemandSchedule

java.lang.Object
  extended bycom.raritantechnologies.searchApp.scheduler.JobSchedule
      extended bycom.raritantechnologies.searchApp.scheduler.OnDemandSchedule
All Implemented Interfaces:
IConfigurable, IJobProcessListener

public class OnDemandSchedule
extends JobSchedule

Schedules a job on demand (i.e. "NOW").

XML Configuration Template:
 <JobSchedule schedulerClass="com.raritantechnologies.searchApp.scheduler.OnDemandSchedule" />
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Field Summary
 
Fields inherited from class com.raritantechnologies.searchApp.scheduler.JobSchedule
COMPLETED, COMPLETED_NORMALLY, completedJobStatus, completedTime, jobStatus, REMOTED, SCHEDULED, scheduledTime, STARTED, startedTime, UNSCHEDULED
 
Constructor Summary
OnDemandSchedule()
           
 
Method Summary
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void jobCompleted(java.lang.Object process, java.util.Date at, int status)
          set status = 0 for normal completion.
 void scheduleJob()
          Adds the job to the scheduled job queue.
 boolean shouldRun(java.util.Date now)
           
 
Methods inherited from class com.raritantechnologies.searchApp.scheduler.JobSchedule
addListener, didRun, getCompletedJobStatus, getCompletedStatus, getCompletedTime, getJobCompletedTime, getJobScheduledTime, getJobStartTime, getJobStatus, getScheduledTime, getStartedTime, jobScheduled, jobStarting, removeListener, setCompletedJobStatus, setCompletedTime, setJobStatus, setScheduledTime, setStartedTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnDemandSchedule

public OnDemandSchedule()
Method Detail

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable
Overrides:
initialize in class JobSchedule

shouldRun

public boolean shouldRun(java.util.Date now)
Overrides:
shouldRun in class JobSchedule

jobCompleted

public void jobCompleted(java.lang.Object process,
                         java.util.Date at,
                         int status)
Description copied from class: JobSchedule
set status = 0 for normal completion.

Specified by:
jobCompleted in interface IJobProcessListener
Overrides:
jobCompleted in class JobSchedule

scheduleJob

public void scheduleJob()
Adds the job to the scheduled job queue.