org.openpipeline.pipeline.connector
Class FileScanner

java.lang.Object
  extended by org.openpipeline.pipeline.connector.FileScanner
All Implemented Interfaces:
Connector, PipelineJob

public class FileScanner
extends Object
implements Connector

A connector that scans a file system and processes the files it finds.


Constructor Summary
FileScanner()
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileScanner

public FileScanner()
Method Detail

execute

public void execute()
Description copied from interface: PipelineJob
Run this Connector. Will typically initiate a crawl of some kind or start listening passively for items on a port.

Specified by:
execute in interface PipelineJob

interrupt

public void interrupt()
Description copied from interface: PipelineJob
Interrupt the execution of this connector.

Specified by:
interrupt in interface PipelineJob

setParams

public void setParams(XMLConfig params)
Description copied from interface: PipelineJob
Configure this connector. The parameters will enable to find content and specify rules for processing it.

Specified by:
setParams in interface PipelineJob
Parameters:
params - parameters defined in an XML file

getLastMessage

public String getLastMessage()
Description copied from interface: PipelineJob
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...").

Specified by:
getLastMessage in interface PipelineJob

getDisplayName

public String getDisplayName()
Description copied from interface: PipelineJob
Return the name of the Connector to display in the Admin UI, for example, "My Connector"

Specified by:
getDisplayName in interface PipelineJob

getDescription

public String getDescription()
Description copied from interface: PipelineJob
Return a description of the Connector for display in the Admin UI, for example, "Scans my data and processes it in a special way"

Specified by:
getDescription in interface PipelineJob

getPageName

public String getPageName()
Description copied from interface: PipelineJob
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.

Specified by:
getPageName in interface PipelineJob

getShortName

public String getShortName()
Description copied from interface: PipelineJob
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.

Specified by:
getShortName in interface PipelineJob

getLogLink

public String getLogLink()
Description copied from interface: PipelineJob
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.

Specified by:
getLogLink in interface PipelineJob