All Packages Class Hierarchy This Package Previous Next Index
Interface kraft.monitor.display.Monitorable
- public interface Monitorable
- extends Remote
Any agent wishing to register itself with, and be monitored by
the Monitor must implement this interface -- or own an object that
is an implementation of this interface, see SelfMonitor for example.
This ensures that all agents are seen to be the same from the
Monitor's point of view, and are all handled in the same way.
Implementations of this interface should be the gateway between an
agent and the Monitor. -- ideally they should deal with contacting the
Monitor to provide information, although this can be dealt with
from anywhere within the agent's code, it is cleaner to make use of
an object which each agent then OWNS such an object, instead
of each agent having to implement the methods defined here).
A Monitorable object can be considered as a 'proxy' for an agent
dealing with all interaction between the Monitor and the actual
agent: eg: KraftAgent
Possible extensions of this interface could define more methods
to allow the Monitor to 'poll' agents to request information
from them (e.g. get a status update, or ensure the agent is
still running etc..).
This interface is marked as Remote for this reason, to allow the
Monitor to call methods on these objects remotely, while they are
running.
The interface defines some different types of agent.
These types will refer to different levels in a visualisation.
(3-layer architecture of USER, MIDDLE and SERVER levels; plus a
BROKER level which is a meta-layer)
- Author:
- Ted Francis
- See Also:
- KraftAgent, MonitorServer, Message
-
BROKER
- Define one type of agent that the Monitor will recognise,
and treat slightly differently to others.
-
MIDDLE
- Define one type of agent that the Monitor will recognise,
and treat slightly differently to others.
-
SERVER
- Define one type of agent that the Monitor will recognise,
and treat slightly differently to others.
-
USER
- Define one type of agent that the Monitor will recognise,
and treat slightly differently to others.
-
getDisplayName(int)
- Return the name of this agent in a format suitable for displaying
on screen.
-
getFullName()
- The full name of the agent.
-
getResourceProtocol()
- For SERVER-type agents: return the protocol used between the
agent and its resource.
-
getResourceType()
- For SERVER-type agents: return the type of resource they are
accessing: eg: 'DB', 'KB' etc..
-
getType()
- Return the type of the agent, this should be one of the types
defined by this interface (BROKER etc.
BROKER
public static final int BROKER
- Define one type of agent that the Monitor will recognise,
and treat slightly differently to others.
The distinction between types is made in the MonitorCanvas,
and could be extended
to handle new types, as this interface could be extended to include
new types.
- See Also:
- MonitorCanvas
USER
public static final int USER
- Define one type of agent that the Monitor will recognise,
and treat slightly differently to others.
The distinction between types is made in the MonitorCanvas,
and could be extended
to handle new types, as this interface could be extended to include
new types.
- See Also:
- MonitorCanvas
MIDDLE
public static final int MIDDLE
- Define one type of agent that the Monitor will recognise,
and treat slightly differently to others.
The distinction between types is made in the MonitorCanvas,
and could be extended
to handle new types, as this interface could be extended to include
new types.
- See Also:
- MonitorCanvas
SERVER
public static final int SERVER
- Define one type of agent that the Monitor will recognise,
and treat slightly differently to others.
The distinction between types is made in the MonitorCanvas,
and could be extended
to handle new types, as this interface could be extended to include
new types.
- See Also:
- MonitorCanvas
getDisplayName
public abstract String getDisplayName(int display_level) throws RemoteException
- Return the name of this agent in a format suitable for displaying
on screen. This can take any format the agent chooses.
- Parameters:
- display_level - Used for different display formats. Agent can
return same string for all values if required.
The current Monitor at the moment uses
values 1 and 2 only.
getFullName
public abstract String getFullName() throws RemoteException
- The full name of the agent. This MUST be in the same format
that is used in the messages the agent sends for correct visualisation
getType
public abstract int getType() throws RemoteException
- Return the type of the agent, this should be one of the types
defined by this interface (BROKER etc.
getResourceType
public abstract String getResourceType() throws RemoteException
- For SERVER-type agents: return the type of resource they are
accessing: eg: 'DB', 'KB' etc..
Could be used by Monitor for displaying an icon of the resource on the
visualisation
getResourceProtocol
public abstract String getResourceProtocol() throws RemoteException
- For SERVER-type agents: return the protocol used between the
agent and its resource.
Could be used by Monitor for displaying an icon of the resource on the
visualisation
All Packages Class Hierarchy This Package Previous Next Index