com.raritantechnologies.searchApp.scheduler
Class JobControlServlet

java.lang.Object
  extended bycom.raritantechnologies.searchApp.scheduler.JobControlServlet
All Implemented Interfaces:
IConfigurable, IServletHandler

public class JobControlServlet
extends java.lang.Object
implements IServletHandler

Controls On demand jobs.

Executes an IJobProcess. Creates an OnDemandSchedule object. Adds an IJobProcessListener to the job process, keeps a sessionID cache of these processes. Adds the Job to the system Scheduler. Responds to commands to monitor the status of the job. If JobProcess is an IReportingProcess, the process outputs can be returned to the browser after the Job is completed.

XML Configuration Template:
   <SystemObject type="ServletHandler" name="[ name of servlet handler - matches param-value in init-param ]" 
                    configurableClass="com.raritantechnologies.searchApp.scheduler.JobControlServlet" >

      <JobProcess class="[ class of com.raritantechnologies.searchApp.scheduler.IJobProcess" >

      </JobProcess>

      <!-- Optional JobSchedule: if no JobSchedule included, job will be run every time the -->
      <!-- service( ) method is called.                                                     -->
      <JobSchedule class="[ class of com.raritantechnologies.searchApp.scheduler.JobSchedule" >

      </JobSchedule>

   </SystemObject>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
JobControlServlet()
           
 
Method Summary
 void init(SearchServlet searchServlet)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void service(DynamicHttpServletRequest pReq, HttpServletResponse pRes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobControlServlet

public JobControlServlet()
Method Detail

init

public void init(SearchServlet searchServlet)
Specified by:
init in interface IServletHandler

service

public void service(DynamicHttpServletRequest pReq,
                    HttpServletResponse pRes)
             throws ServletException,
                    java.io.IOException
Specified by:
service in interface IServletHandler
Throws:
ServletException
java.io.IOException

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