org.apache.manifoldcf.agents.system
Class ManifoldCF

java.lang.Object
  extended by org.apache.manifoldcf.core.system.ManifoldCF
      extended by org.apache.manifoldcf.agents.system.ManifoldCF
Direct Known Subclasses:
ManifoldCF

public class ManifoldCF
extends ManifoldCF


Nested Class Summary
protected static class ManifoldCF.AgentsShutdownHook
          Agents shutdown hook class
 
Nested classes/interfaces inherited from class org.apache.manifoldcf.core.system.ManifoldCF
ManifoldCF.DatabaseConnectionReleaseThread, ManifoldCF.DatabaseShutdown, ManifoldCF.FileTrack, ManifoldCF.ShutdownThread
 
Field Summary
static java.lang.String _rcsid
           
protected static boolean agentsInitialized
           
protected static java.lang.String API_ERRORNODE
           
protected static java.lang.String API_SERVICEINTERRUPTIONNODE
           
protected static java.util.HashMap runningHash
          This is the place we keep track of the agents we've started.
protected static boolean stopAgentsRun
          This flag prevents startAgents() from starting anything once stopAgents() has been called.
 
Fields inherited from class org.apache.manifoldcf.core.system.ManifoldCF
alreadyClosed, applicationName, ATTRIBUTE_NAME, ATTRIBUTE_PATH, ATTRIBUTE_VALUE, cleanupHooks, configSignalCommandProperty, databaseHandleMaxcountProperty, databaseHandleTimeoutProperty, databaseImplementation, dbShutdown, initializeFlagLock, isInitialized, lcfConfigFileProperty, localConfiguration, localProperties, lockManagerImplementation, logConfigFileProperty, maintenanceFileSignalProperty, masterDatabaseName, masterDatabaseNameProperty, masterDatabasePassword, masterDatabasePasswordProperty, masterDatabaseUsername, masterDatabaseUsernameProperty, NODE_LIBDIR, NODE_PROPERTY, propertyFilelastMod, propertyFilePath, resourceLoader, shutdownThread, tracker, workingDirectory
 
Constructor Summary
ManifoldCF()
           
 
Method Summary
static void createErrorNode(Configuration output, ManifoldCFException e)
          Handle an exception, by converting it to an error node.
static void createServiceInterruptionNode(Configuration output, ServiceInterruption e)
          Handle a service interruption, by converting it to a serviceinterruption node.
static void deinstallTables(IThreadContext threadcontext)
          Uninstall all the crawler system tables.
static ConfigurationNode findConfigurationNode(Configuration input, java.lang.String argumentName)
          Find a configuration node given a name
static java.lang.String getRootArgument(Configuration input, java.lang.String argumentName)
          Find a configuration value given a name
static void initializeEnvironment()
          Initialize environment.
static void installTables(IThreadContext threadcontext)
          Install the agent tables.
static void signalOutputConnectionRedo(IThreadContext threadContext, java.lang.String connectionName)
          Signal output connection needs redoing.
static void startAgents(IThreadContext threadContext)
          Start all not-running agents.
static void stopAgents(IThreadContext threadContext)
          Stop all started agents.
 
Methods inherited from class org.apache.manifoldcf.core.system.ManifoldCF
addFile, addShutdownHook, addToHash, checkMaintenanceUnderway, checkProperties, cleanUpSystem, createResourceLoader, createSystemDatabase, deleteFile, deleteFolder, deobfuscate, dropSystemDatabase, encrypt, ensureFolder, findClass, getChildDatabaseName, getFileProperty, getHashValue, getIntProperty, getMasterDatabaseName, getMasterDatabasePassword, getMasterDatabaseUsername, getProperty, hash, isFolder, noteConfigurationChange, obfuscate, readByte, readByteArray, readBytes, readDword, readfloat, readLong, readNibble, readSdword, readString, readWord, recursiveDelete, resolvePath, safeFileName, sleep, startHash, writeByte, writeByteArray, writeBytes, writeDword, writefloat, writeLong, writeNibble, writeSdword, writeString, writeWord
 
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

agentsInitialized

protected static boolean agentsInitialized

runningHash

protected static java.util.HashMap runningHash
This is the place we keep track of the agents we've started.


stopAgentsRun

protected static boolean stopAgentsRun
This flag prevents startAgents() from starting anything once stopAgents() has been called.


API_ERRORNODE

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

API_SERVICEINTERRUPTIONNODE

protected static final java.lang.String API_SERVICEINTERRUPTIONNODE
See Also:
Constant Field Values
Constructor Detail

ManifoldCF

public ManifoldCF()
Method Detail

initializeEnvironment

public static void initializeEnvironment()
                                  throws ManifoldCFException
Initialize environment.

Throws:
ManifoldCFException

installTables

public static void installTables(IThreadContext threadcontext)
                          throws ManifoldCFException
Install the agent tables. This is also responsible for upgrading the existing tables!!!

Parameters:
threadcontext - is the thread context.
Throws:
ManifoldCFException

deinstallTables

public static void deinstallTables(IThreadContext threadcontext)
                            throws ManifoldCFException
Uninstall all the crawler system tables.

Parameters:
threadcontext - is the thread context.
Throws:
ManifoldCFException

startAgents

public static void startAgents(IThreadContext threadContext)
                        throws ManifoldCFException
Start all not-running agents.

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

stopAgents

public static void stopAgents(IThreadContext threadContext)
                       throws ManifoldCFException
Stop all started agents.

Throws:
ManifoldCFException

signalOutputConnectionRedo

public static void signalOutputConnectionRedo(IThreadContext threadContext,
                                              java.lang.String connectionName)
                                       throws ManifoldCFException
Signal output connection needs redoing. This is called when something external changed on an output connection, and therefore all associated documents must be reindexed.

Parameters:
threadContext - is the thread context.
connectionName - is the connection name.
Throws:
ManifoldCFException

findConfigurationNode

public static ConfigurationNode findConfigurationNode(Configuration input,
                                                      java.lang.String argumentName)
Find a configuration node given a name


getRootArgument

public static java.lang.String getRootArgument(Configuration input,
                                               java.lang.String argumentName)
Find a configuration value given a name


createErrorNode

public static void createErrorNode(Configuration output,
                                   ManifoldCFException e)
                            throws ManifoldCFException
Handle an exception, by converting it to an error node.

Throws:
ManifoldCFException

createServiceInterruptionNode

public static void createServiceInterruptionNode(Configuration output,
                                                 ServiceInterruption e)
Handle a service interruption, by converting it to a serviceinterruption node.