public class AgentsDaemon extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
AgentsDaemon.AgentsShutdownHook
Agents shutdown hook class
|
protected class |
AgentsDaemon.AgentsThread
Agents thread.
|
protected static class |
AgentsDaemon.CleanupAgent
Agent cleanup class.
|
Modifier and Type | Field and Description |
---|---|
static String |
_rcsid |
static String |
agentServicePrefix
Agent service name prefix (followed by agent class name)
|
static String |
agentShutdownSignal
Agent shutdown signal name
|
protected AgentsDaemon.AgentsThread |
agentsThread
The agents thread, which starts and stops agents daemons to keep them consistent with the database, and
also takes on process cleanup where necessary.
|
protected IdleCleanupThread |
idleCleanupThread
The idle cleanup thread.
|
protected String |
processID
Process ID for this agents daemon.
|
protected Map<String,IAgent> |
runningHash
This is the place we keep track of the agents we've started.
|
Constructor and Description |
---|
AgentsDaemon(String processID)
Create an agents daemon object.
|
Modifier and Type | Method and Description |
---|---|
static void |
assertAgentsShutdownSignal(IThreadContext threadContext)
Assert shutdown signal for the current agents daemon.
|
protected void |
checkAgents(IThreadContext threadContext)
Start all not-running agents.
|
static void |
clearAgentsShutdownSignal(IThreadContext threadContext)
Clear shutdown signal for the current agents daemon.
|
protected static String |
getAgentsClassServiceType(String agentClassName) |
void |
registerAgentsShutdownHook(IThreadContext threadContext)
Register agents shutdown hook.
|
void |
runAgents(IThreadContext threadContext)
Run agents process.
|
void |
startAgents(IThreadContext threadContext)
Start agents thread for this agents daemon object.
|
void |
stopAgents(IThreadContext threadContext)
Stop all started agents running under this agents daemon.
|
public static final String _rcsid
public static final String agentShutdownSignal
public static final String agentServicePrefix
protected AgentsDaemon.AgentsThread agentsThread
protected IdleCleanupThread idleCleanupThread
protected final String processID
public AgentsDaemon(String processID)
processID
- is the process ID of this agents daemon. Process ID's must be unique
for all agents daemons.public static void assertAgentsShutdownSignal(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException
public static void clearAgentsShutdownSignal(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException
public void registerAgentsShutdownHook(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException
public void runAgents(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException
public void startAgents(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException
public void stopAgents(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException
protected void checkAgents(IThreadContext threadContext) throws ManifoldCFException
threadContext
- is the thread context.ManifoldCFException