public interface MonitorListener
extends java.util.EventListener
The sub-interfaces of MonitorListener include:
These sub-interfaces are used to register with the TIBHawkConsole for delivery of MonitorEvent objects. The console will deliver all events to all MonitorListener objects in a single thread. All MonitorEvent objects pertain to individual agents and are used to track agent status. The source of the event will always be the AgentInstance object which identifies the particular agent from which the event logically originated.
A registered listener for a particular type of MonitorEvent will receive notifications for all monitored agents that generate that event. For example, registering a AgentMonitorEventLister with the console will allow it to receive AgentMonitorEvents for all agents known to the console, thus allowing it to track the alive/expired status of every agent.
AgentInstance, AgentID, and MonitorListener
All MonitorEvents delivered to MonitorListener interfaces contain an
AgentInstance
object as their source.
When the console discovers an agent, it will create a unique AgentInstance object and
deliver it in an event to AgentMonitorListener.onAgentAlive().
It will then begin delivering monitor events for that AgentInstance
to the other registered MonitorListener objects.
When the console loses communication with that agent, it will deliver that same AgentInstance object
in an event to AgentMonitorListener.onAgentExpired().
No MonitorEvents will be delivered for a particular AgentInstance object before the console calls AgentMonitorListener.onAgentAlive() or after it calls AgentMonitorListener.onAgentExpired() for that same AgentInstance object. Thus, AgentInstance objects represent a communications session with a particular agent. The life span of this session begins with a call to AgentMonitorListener.onAgentAlive() and ends with a call to AgentMonitorListener.onAgentExpired().
When the console loses and then reestablishes communication with an agent (such as when an agent process is restarted or when there is a temporary network disconnect), a new AgentInstance object will be generated to represent the new session.
AgentInstance objects contain an
AgentID
object. AgentID objects can be used to associate
MonitorEvents with real agent processes across the communication sessions represented by
AgentInstance objects.
If an agent is restarted, the AgentID in the new AgentInstance object will equal that in the old.
AgentID objects identify real agent processes through the combination of agent name,
agent dns name, and hawk domain.
The TIB/Hawk system requires that all running agents have a unique combination of these three values.
It is up to the system administrator to insure that every real agent running in the network
has a unique combination of these three values. If the console can detect that more than one
real agent has the same AgentID, it will produce a WarningExceptionEvent
(See
WarningExceptionListener
to that effect
and ignore the duplicates.
Because events will no longer be delivered for a particular AgentInstance once it is
declared expired, it is recommended that applications that use any of the MonitorListener
sub-interfaces also make use of the
AgentMonitorListener
interface in order to determine when an agent expires.
For example, if you use an AlertMonitorListener to track agent alerts, you will probably want
to learn when you will no longer receive alerts for a particular AgentInstance.
IMPORTANT:
It is strongly recommended that applications using MonitorEventListers also make
use of the
ErrorExceptionListener
interface in order to be notified of any critical console errors. When a critical console error occurs,
the console is unable to deliver any more MonitorEvents.
Copyright © 2000-2019 TIBCO Inc. All Rights Reserved.