public class AgentsDaemon
extends java.lang.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 java.lang.String |
_rcsid |
static java.lang.String |
agentServicePrefix
Agent service name prefix (followed by agent class name)
|
static java.lang.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 java.lang.String |
processID
Process ID for this agents daemon.
|
protected java.util.Map<java.lang.String,IAgent> |
runningHash
This is the place we keep track of the agents we've started.
|
Constructor and Description |
---|
AgentsDaemon(java.lang.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 java.lang.String |
getAgentsClassServiceType(java.lang.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 java.lang.String _rcsid
public static final java.lang.String agentShutdownSignal
public static final java.lang.String agentServicePrefix
protected AgentsDaemon.AgentsThread agentsThread
protected IdleCleanupThread idleCleanupThread
protected final java.lang.String processID
protected final java.util.Map<java.lang.String,IAgent> runningHash
public AgentsDaemon(java.lang.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 static java.lang.String getAgentsClassServiceType(java.lang.String agentClassName)
protected void checkAgents(IThreadContext threadContext) throws ManifoldCFException
threadContext
- is the thread context.ManifoldCFException