org.openpipeline.scheduler
Interface PipelineJob

All Known Subinterfaces:
Connector
All Known Implementing Classes:
FileScanner, ItemReceiverConnector, SQLDatabaseCrawler, WebCrawler

public interface PipelineJob

A job that implements this interface can be executed by the pipeline system.


Method Summary
 void execute()
          Run this Connector.
 String getDescription()
          Return a description of the Connector for display in the Admin UI, for example, "Scans my data and processes it in a special way"
 String getDisplayName()
          Return the name of the Connector to display in the Admin UI, for example, "My Connector"
 String getLastMessage()
          Returns the most recent status message from the job.
 String getLogLink()
          Return the link the admin interface should use to display log files associated with this job.
 String getPageName()
          Return the name of the page in the Admin UI to edit the parameters, for example, "connector_myconnector.jsp".
 String getShortName()
          Return the name to use when creating a name for a connector instance on the Add Job page in the Admin UI, for example, "MyConnector".
 void interrupt()
          Interrupt the execution of this connector.
 void setParams(XMLConfig params)
          Configure this connector.
 

Method Detail

execute

void execute()
Run this Connector. Will typically initiate a crawl of some kind or start listening passively for items on a port.


interrupt

void interrupt()
Interrupt the execution of this connector.


setParams

void setParams(XMLConfig params)
Configure this connector. The parameters will enable to find content and specify rules for processing it.

Parameters:
params - parameters defined in an XML file

getLastMessage

String getLastMessage()
Returns the most recent status message from the job. This is specific to the job; could return "Running" or "Idle", or could return some kind of progress indicator ("Completed 1 of 10...").


getDisplayName

String getDisplayName()
Return the name of the Connector to display in the Admin UI, for example, "My Connector"


getShortName

String getShortName()
Return the name to use when creating a name for a connector instance on the Add Job page in the Admin UI, for example, "MyConnector". The Admin will take this name, append one or more digits, and display it in the "Enter name of connector:" prompt.


getDescription

String getDescription()
Return a description of the Connector for display in the Admin UI, for example, "Scans my data and processes it in a special way"


getPageName

String getPageName()
Return the name of the page in the Admin UI to edit the parameters, for example, "connector_myconnector.jsp". The convention is to start the name with "connector_" for connectors.


getLogLink

String getLogLink()
Return the link the admin interface should use to display log files associated with this job. For example, if this job uses the main server log, the link should be "server_log.jsp". If it were to create its own directory of log files under /logs, then the link would be "server_log.jsp?logtype=my_directory". If this job does not have a log file, returns null. This link appears on the view_jobs page and possibly elsewhere.