Agent-Alive Monitoring
The most basic type of monitoring is the monitoring of agent existence. This is achieved by registering an AgentMonitorListener
with the AgentMonitor
. When you register an AgentMonitorListener
, it will receive one agent-alive event for every agent the console can detect.
An agent-alive event is actually represented by the delivery of an AgentMonitorEvent
to the onAgentAlive()
method of the listener. This event contains a reference to an AgentInstance
object which identifies which agent it pertains to. As new agents appear in the network, new agent-alive events will be generated to identify them. When the console is no longer able to communicate with an agent, it will issue an agent-expired event for that agent. This is performed by delivering a AgentMonitorEvent
to the onAgentExpired()
method of the listener. As before, this event contains a reference to an AgentInstance
object which identifies which agent it pertains to. The console can lose communication with an agent for several reasons, for example if the agent process is no longer running, the machine it was running on has crashed, or because of a problem in the underlying communications infrastructure such as a network outage.