org.cougaar.core.agent |
This package contains the Cougaar
agent base class and bootstrapping components.
The top-level JVM {@link org.cougaar.core.node.Node} loads the
{@link org.cougaar.core.agent.AgentManager}, which will contain all
the agents on the JVM. The AgentManager loads the configuration
service ({@link org.cougaar.core.node.ComponentInitializerService})
and the node agent {@link org.cougaar.core.agent.AgentImpl}, which is
an agent named after the "-Dorg.cougaar.node.name" system property.
Like all agents, the node agent's AgentImpl loads a single {@link
org.cougaar.core.agent.Bootstrap} component that specifies
the agent's initial component list. The bootstrap loads the minimal
number of components necessary to read the XML configuration file
and/or persistence snapshot, which will fill in the full agent
configuration. The node agent's {@link
org.cougaar.core.node.AgentLoader} then instructs the AgentManager
to load the other agents that should run on the node.
Many of the components in this package are not required by the
bootstrap but are used in the standard agent XML/XSL template
($CIP/configs/common/SimpleAgent.xsl) to load basic services.
For example, the {@link org.cougaar.core.agent.MessageSwitch}
component is used to provide a common message transport service
interface for components within the agent.
Also note that many of the components and services in this package
act as "glue" to coordinate agent bootstrapping and mobility.
For example, the {@link org.cougaar.core.agent.MessageSwitch}
component is loaded early to allow other agent components to register
{@link org.cougaar.core.agent.service.MessageSwitchService} handlers,
such as the blackboard's {@link org.cougaar.core.agent.QueueHandler}.
However, message delivery must wait until all components have
loaded and had a chance to register their handlers, otherwise these
early messages will be dropped. The MessageSwitch advertises a
"glue" {@link org.cougaar.core.agent.MessageSwitchUnpendService}
with an "unpendMessages()" method that will release the queued
messages. A trivial {@link
org.cougaar.core.agent.MessageSwitchUnpend} component is loaded
late in the agent, after all the other components have been loaded,
just to invoke the "unpendMessages()" method at the right time.
For more detail, see the
Cougaar Developers' Guide.
|
Java Source File Name | Type | Comment |
AcquireIdentity.java | Class | This component acquires the agent's security identity from the
optional
AgentIdentityService and transfers the identity
when the agent moves. |
Agent.java | Class | The abstract agent base class, which is subclassed by
AgentImpl .
This is primarily a marker class, since AgentImpl is used for
all agent types. |
AgentBootstrapService.java | Interface | This service allows a component to modify its agent's list of
components as it is being loaded, which is part of the agent's
bootstrap process.
This is only for use by
Bootstrap and
FindComponentsEarly , to override the default list
of components with a persisted list that specifies the dynamically
added/removed components.
This service can only be used during agent "load()", and can only
be used to view or modify the list of ComponentDescriptions that
have not be loaded yet. |
AgentComponentModelService.java | Interface | This service allows a component to capture its agent's
component model state. |
AgentContainer.java | Interface | The AgentContainer manages all agents on the node. |
AgentImpl.java | Class | AgentImpl is the base class for all agents. |
AgentManager.java | Class | A container for Agents.
Although the AgentManager can hold Components other than Agents,
the default BinderFactory will only actually accept Agents and
other Binders. |
AgentStateModelService.java | Interface | This service allows a component within the agent to transition the
agent's state (suspend/resume/stop/unload). |
AlarmComponent.java | Class | This component adds the agent's
AlarmService , based
upon the node-level
RealTimeService and
NaturalTimeService . |
BeginLogger.java | Class | This component is loaded early in the agent, to announce
the agent Loading/Starting/etc state transitions. |
Bootstrap.java | Class | This component is the first component added to an agent, and
is used to bootstrap the agent with the minimal initial
components. |
ClusterContext.java | Interface | Interface to the
ClusterContextTable ThreadLocal that
allows static deserialization clients to find the thread's agent
address. |
ClusterContextTable.java | Class | Table of agent addresses on this VM, allowing static
deserialization threads to find their agent's address. |
ClusterMessage.java | Class | The base class for blackboard messages, which pass through the agent's
QueueHandler before entering the blackboard. |
DemoControl.java | Class | This component adds the agent's
DemoControlService .
This implementation uses the
MessageSwitchService to
send the society time-advance requests to other nodes. |
DemoControlMessage.java | Class | A message sent by the
DemoControl component to
set the execution time on a single node, or to acknowledge
another node's DemoControlMessage. |
EndLogger.java | Class | This component is loaded late in the agent, to announce
the agent Suspening/Stopping/etc state transitions. |
Events.java | Class | This component generates
EventService events
to announce the agent's load/start/stop/etc and move. |
FindComponentsEarly.java | Class | This component registers with persistence as the component
model tracker and finds the agent's component descriptions
in the rehydrated persistence snapshot. |
FindComponentsLate.java | Class | This component uses the
FindComponentsLoadService to tell
the
FindComponentsEarly component to read the persistence
snapshot. |
FindComponentsLoadService.java | Interface | This service is used by the agent's component model rehydration
to signal rehydration from a persistence snapshot, which must
occur after the agent identity is acquired.
This service is only available during the agent "load()". |
MessageSwitch.java | Class | This component registers the agent in the
MessageTransportService and forwards all received
messages through the
MessageSwitchService to the
agent-internal message handlers. |
MessageSwitchShutdown.java | Class | This component invokes the
MessageSwitchShutdownService during agent suspend and resume. |
MessageSwitchShutdownService.java | Interface | This service is used to shutdown the
MessageSwitch during
agent "suspend()" and restart the message switch during
agent "resume()". |
MessageSwitchUnpend.java | Class | This component invokes the
MessageSwitchUnpendService at
the end of the agent load. |
MessageSwitchUnpendService.java | Interface | This service is used to "unpend" buffered messages at the
end of agent load. |
MobilityNotificationClient.java | Interface | Callback API for
MobilityNotificationService clients. |
MobilityNotificationService.java | Interface | This service allows
MobilityNotificationClient clients to
register for agent mobility callbacks. |
NodeControlBlocker.java | Class | This component blocks the
NodeControlService if the
agent's address does not match the node's address. |
QueueHandler.java | Class | This component buffers blackboard messages while the agent is
loading, plus switches threads when receiving messages to avoid
blocking the message transport thread. |
Reconcile.java | Class | This component watches blackboard message traffic and periodically
checks the white pages for agent restarts, which require
blackboard-to-blackboard state reconciliation. |
ReconcileAddressWatcherService.java | Interface | This service tracks blackboard message traffic, which is used to
poll for agent restarts and force reconciliation in case state
was lost. |
ReconcileEnabler.java | Class | This component uses the
ReconcileEnablerService provided by the
Reconcile component to enable and
disable blackboard reconciliation. |
ReconcileEnablerService.java | Interface | This service is used to start and stop blackboard
reconciliation when the agent is starting/stopping/etc. |
RegisterAgent.java | Class | This component registers the agent with the node's
RegisterAgentService , which is used to track dynamically
added and removed agents. |
RegisterContext.java | Class | This component registers the agent name in the
ClusterContextTable , which is required for serialization
and deserialization of persistence snapshots and messages. |
RehydrateEarly.java | Class | This component rehydrates the agent persistence object
and acts as a proxy for agent mobility state capture. |
RehydrateLate.java | Class | This component uses the
RehydrateLoadService to tell
the
RehydrateEarly component to read the persistence
snapshot. |
RehydrateLoadService.java | Interface | This service is used by the agent rehydration components
to signal rehydration from a persistence snapshot, which
must occur after the agent identity is acquired.
This service is only available during the agent "load()". |
SimpleAgent.java | Class | |
Topology.java | Class | This component binds the agent's "version://" and
"node://" information in the white pages, and preserves the
incarnation across agent moves. |
TopologyService.java | Interface | This service is used by the
MessageSwitch to
obtain the local agent's incarnation number, which is
updated every time the agent is rehydrated (but not on
moves). |