org.apache.manifoldcf.agents.agentmanager
Class AgentManager

java.lang.Object
  extended by org.apache.manifoldcf.core.database.BaseTable
      extended by org.apache.manifoldcf.agents.agentmanager.AgentManager
All Implemented Interfaces:
IAgentManager

public class AgentManager
extends BaseTable
implements IAgentManager

This is the implementation of IAgentManager.


Field Summary
static java.lang.String _rcsid
           
protected static java.lang.String classNameField
           
protected  IThreadContext threadContext
           
 
Fields inherited from class org.apache.manifoldcf.core.database.BaseTable
dbInterface, tableName
 
Constructor Summary
AgentManager(IThreadContext threadContext, IDBInterface database)
          Constructor.
 
Method Summary
 void deinstall()
          Uninstall.
 java.lang.String[] getAllAgents()
          Get a list of all registered agent class names.
 void install()
          Install or upgrade.
 void registerAgent(java.lang.String className)
          Register an agent.
 void removeAgent(java.lang.String className)
          Remove an agent.
 void unregisterAgent(java.lang.String className)
          Unregister an agent.
 
Methods inherited from class org.apache.manifoldcf.core.database.BaseTable
addTableIndex, analyzeTable, beginTransaction, constructDistinctOnClause, constructOffsetLimitClause, constructRegexpClause, constructSubstringClause, endTransaction, getDatabaseCacheKey, getDBInterface, getMaxInClause, getMaxOrClause, getTableIndexes, getTableName, getTableSchema, getTransactionID, makeTableKey, noteModifications, performAddIndex, performAlter, performCreate, performDelete, performDrop, performInsert, performLock, performModification, performQuery, performQuery, performRemoveIndex, performUpdate, prepareRowForSave, readRow, reindexTable, signalRollback
 
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

classNameField

protected static final java.lang.String classNameField
See Also:
Constant Field Values

threadContext

protected IThreadContext threadContext
Constructor Detail

AgentManager

public AgentManager(IThreadContext threadContext,
                    IDBInterface database)
             throws ManifoldCFException
Constructor.

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

install

public void install()
             throws ManifoldCFException
Install or upgrade.

Specified by:
install in interface IAgentManager
Throws:
ManifoldCFException

deinstall

public void deinstall()
               throws ManifoldCFException
Uninstall. Also uninstalls all remaining agents.

Specified by:
deinstall in interface IAgentManager
Throws:
ManifoldCFException

registerAgent

public void registerAgent(java.lang.String className)
                   throws ManifoldCFException
Register an agent.

Specified by:
registerAgent in interface IAgentManager
Parameters:
className - is the class.
Throws:
ManifoldCFException

unregisterAgent

public void unregisterAgent(java.lang.String className)
                     throws ManifoldCFException
Unregister an agent.

Specified by:
unregisterAgent in interface IAgentManager
Parameters:
className - is the class to unregister.
Throws:
ManifoldCFException

removeAgent

public void removeAgent(java.lang.String className)
                 throws ManifoldCFException
Remove an agent. Use this when the agent cannot be invoked. The agent becomes unavailable, but its schema is not cleaned up.

Specified by:
removeAgent in interface IAgentManager
Parameters:
className - is the class to remove.
Throws:
ManifoldCFException

getAllAgents

public java.lang.String[] getAllAgents()
                                throws ManifoldCFException
Get a list of all registered agent class names.

Specified by:
getAllAgents in interface IAgentManager
Returns:
the classnames in an array.
Throws:
ManifoldCFException