org.apache.manifoldcf.crawler.system
Class CrawlerAgent

java.lang.Object
  extended by org.apache.manifoldcf.crawler.system.CrawlerAgent
All Implemented Interfaces:
IAgent

public class CrawlerAgent
extends java.lang.Object
implements IAgent

This is the main agent class for the crawler.


Field Summary
static java.lang.String _rcsid
           
protected  IThreadContext threadContext
           
 
Constructor Summary
CrawlerAgent(IThreadContext threadContext)
          Constructor.
 
Method Summary
 void deinstall()
          Uninstall agent.
 void install()
          Install agent.
 boolean isOutputConnectionInUse(java.lang.String connName)
          Request permission from agent to delete an output connection.
 void noteOutputConnectionChange(java.lang.String connectionName)
          Note a change in configuration for an output connection.
 void noteOutputConnectorDeregistration(java.lang.String[] connectionNames)
          Note the deregistration of a set of output connections.
 void noteOutputConnectorRegistration(java.lang.String[] connectionNames)
          Note the registration of a set of output connections.
 void signalOutputConnectionRedo(java.lang.String connectionName)
          Signal that an output connection needs to be "redone".
 void startAgent()
          Start the agent.
 void stopAgent()
          Stop the agent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rcsid

public static final java.lang.String _rcsid
See Also:
Constant Field Values

threadContext

protected IThreadContext threadContext
Constructor Detail

CrawlerAgent

public CrawlerAgent(IThreadContext threadContext)
             throws ManifoldCFException
Constructor.

Parameters:
threadContext - is the thread context.
Throws:
ManifoldCFException
Method Detail

install

public void install()
             throws ManifoldCFException
Install agent. This usually installs the agent's database tables etc.

Specified by:
install in interface IAgent
Throws:
ManifoldCFException

deinstall

public void deinstall()
               throws ManifoldCFException
Uninstall agent. This must clean up everything the agent is responsible for.

Specified by:
deinstall in interface IAgent
Throws:
ManifoldCFException

startAgent

public void startAgent()
                throws ManifoldCFException
Start the agent. This method should spin up the agent threads, and then return.

Specified by:
startAgent in interface IAgent
Throws:
ManifoldCFException

stopAgent

public void stopAgent()
               throws ManifoldCFException
Stop the agent. This should shut down the agent threads.

Specified by:
stopAgent in interface IAgent
Throws:
ManifoldCFException

isOutputConnectionInUse

public boolean isOutputConnectionInUse(java.lang.String connName)
                                throws ManifoldCFException
Request permission from agent to delete an output connection.

Specified by:
isOutputConnectionInUse in interface IAgent
Parameters:
connName - is the name of the output connection.
Returns:
true if the connection is in use, false otherwise.
Throws:
ManifoldCFException

noteOutputConnectorDeregistration

public void noteOutputConnectorDeregistration(java.lang.String[] connectionNames)
                                       throws ManifoldCFException
Note the deregistration of a set of output connections.

Specified by:
noteOutputConnectorDeregistration in interface IAgent
Parameters:
connectionNames - are the names of the connections being deregistered.
Throws:
ManifoldCFException

noteOutputConnectorRegistration

public void noteOutputConnectorRegistration(java.lang.String[] connectionNames)
                                     throws ManifoldCFException
Note the registration of a set of output connections.

Specified by:
noteOutputConnectorRegistration in interface IAgent
Parameters:
connectionNames - are the names of the connections being registered.
Throws:
ManifoldCFException

noteOutputConnectionChange

public void noteOutputConnectionChange(java.lang.String connectionName)
                                throws ManifoldCFException
Note a change in configuration for an output connection.

Specified by:
noteOutputConnectionChange in interface IAgent
Parameters:
connectionName - is the name of the connections being changed.
Throws:
ManifoldCFException

signalOutputConnectionRedo

public void signalOutputConnectionRedo(java.lang.String connectionName)
                                throws ManifoldCFException
Signal that an output connection needs to be "redone". This means that all documents sent to that output connection must be sent again, and the history as to their status must be forgotten.

Parameters:
connectionName - is the name of the connection being signalled.
Throws:
ManifoldCFException