All Packages Class Hierarchy This Package Previous Next Index
Class kraft.monitor.adapter.KraftAgent
java.lang.Object
|
+----kraft.monitor.adapter.KraftAgent
- public class KraftAgent
- extends Object
- implements Monitorable
Implements the requirements for a Monitorable object.
Used to represent a Kraft Agent so it can be registered by the
Monitor
Class could be extended to allow the Monitor to 'callback' this
object, which would act as a proxy for the actual (possibly Prolog)
agent, communicate the monitor's request to the agent, and receive
replies from the agent
- Author:
- Ted Francis
-
KraftAgent(String)
- Create a KraftAgent with the given name
-
addInfoPair(String, String)
- Adds more info to the agent, in a similar way to
resource: type, protocol: type,
This info is used when getDisplayString(2) is
called.
-
getDisplayName(int)
- Gets the name of this agent in a formatted form.
-
getFullName()
- The unformatted name of the agent
-
getResourceProtocol()
- The protocol used between the agent and its
resource (if any).
-
getResourceType()
- The name of the resource this agent
wraps onto (if any).
-
getType()
- The Monitorable type of the agent.
-
setResource(String, String)
- Sets the type of resource, and protocol this agent uses
to communicate with that resource
Set either param to null or "" if required.
-
setRole(String)
- Set the KRAFT role of this agent.
KraftAgent
KraftAgent(String n) throws NullPointerException
- Create a KraftAgent with the given name
getDisplayName
public String getDisplayName(int detail_level)
- Gets the name of this agent in a formatted form.
- Parameters:
- detail_level - if 1, returns just the name of the agent
if 2, returns more detail about the agent
getFullName
public String getFullName()
- The unformatted name of the agent
getType
public int getType()
- The Monitorable type of the agent.
eg. BROKER, USER, MIDDLE, SERVER
getResourceType
public String getResourceType()
- The name of the resource this agent
wraps onto (if any). Otherwise returns ""
getResourceProtocol
public String getResourceProtocol()
- The protocol used between the agent and its
resource (if any). Otherwise returns ""
setRole
public void setRole(String role)
- Set the KRAFT role of this agent. Used to discern the Monitorable
type of the agent for display purposes. The agent will be displayed
on the screen in different areas depending on the role
- Parameters:
- role - Any one of "ontology_agent", "ontologyagent", "facilitator",
"user_agent", "useragent", "auxiliary",
"mediator", "resource", "wrapper"
- See Also:
- getType
setResource
public void setResource(String resource,
String protocol)
- Sets the type of resource, and protocol this agent uses
to communicate with that resource
Set either param to null or "" if required.
addInfoPair
public void addInfoPair(String field,
String value)
- Adds more info to the agent, in a similar way to
resource: type, protocol: type,
This info is used when getDisplayString(2) is
called.
- Parameters:
- field - any label
- value - any label -- the info pair will be shown thus
( field : value )
All Packages Class Hierarchy This Package Previous Next Index