zeus.actors
Interface AgentContext

All Known Implementing Classes:
ZeusAgentContext

public interface AgentContext

Every agent must have an implementor of this intereface, or they probably won't work.

The implementors of this interface should be thought of as being directories of object references which can be accessed from various parts of the agent to get at the other parts.

Numerous doubts have been expressed about this strategy, because it promotes tight coupleing between the components of the agent, but moving away from it seems likely to be an extensive peice of work, so it was decided (who am I kidding? I decided) that it would be a good idea to refactor this as an interface to at least promote the possibilitiy that different component sets could be added/used.

Since:
1.1
Author:
Simon Thompson
See Also:
ZeusAgentContext

Method Summary
 void addFacilitator(java.lang.String agent)
           
 void addNameserver(Address address)
           
 AddressBook AddressBook()
           
 BasicAgent Agent()
           
 BasicAgentUI AgentUI()
           
 Clock Clock()
           
 Time currentTime()
           
 Engine Engine()
           
 ExecutionMonitor ExecutionMonitor()
           
 ExternalDb ExternalDb()
           
 java.util.Vector facilitators()
           
 GenSym GenSym()
           
 double getAcceptTimeout()
           
 AddressBook getAddressBook()
           
 double getAddressBookRefresh()
           
 double getAddressTimeout()
           
 BasicAgent getAgent()
           
 BasicAgentUI getAgentUI()
           
 Clock getClock()
           
 long getClockStep()
           
 Engine getEngine()
           
 boolean getExecuteEarliest()
           
 ExecutionMonitor getExecutionMonitor()
           
 ExternalDb getExternalDb()
           
 double getFacilitatorRefresh()
           
 java.util.Vector getFacilitators()
           
 double getFacilitatorTimeout()
           
 GenSym getGenSym()
           
 InTray getInTray()
           
 MailBox getMailBox()
           
 MsgHandler getMsgHandler()
           
 java.util.Vector getNameservers()
           
 OntologyDb getOntologyDb()
           
 OrganisationDb getOrganisationDb()
           
 Planner getPlanner()
           
 ProtocolDb getProtocolDb()
           
 java.util.Hashtable getQueryTable()
           
 double getRegistrationTimeout()
           
 double getReplanPeriod()
           
 ResourceDb getResourceDb()
           
 ReteEngine getReteEngine()
           
 boolean getSharePlan()
           
 TaskDb getTaskDb()
           
 TransportFactory getTransportFactory()
           
 ZeusExternal getZeusExternal()
           
 MailBox MailBox()
           
 MsgHandler MsgHandler()
           
 java.util.Vector nameservers()
           
 java.lang.String newId()
           
 java.lang.String newId(java.lang.String tag)
           
 double now()
           
 OntologyDb OntologyDb()
           
 OrganisationDb OrganisationDb()
           
 Planner Planner()
           
 ProtocolDb ProtocolDb()
           
 java.util.Hashtable queryTable()
           
 void removeFacilitator(java.lang.String agent)
           
 void removeNameserver(java.lang.String address)
           
 ResourceDb ResourceDb()
           
 ReteEngine ReteEngine()
           
 void set(AddressBook addressBook)
          set the addressBook for this agent
 void set(BasicAgent agent)
          set a reference to the agent object into this context object
 void set(BasicAgentUI agentUI)
           
 void set(Clock clock)
          setting the clock is a vital activity for a Zeus agent, basically by getting a Clock that is set to the Agency time (provided by the ANServer) the agent are able to co-ordinate their actions
 void set(Engine engine)
           
 void set(ExecutionMonitor monitor)
           
 void set(ExternalDb externalDb)
           
 void set(MailBox mbox)
           
 void set(MsgHandler msgHandler)
           
 void set(OntologyDb ontologyDb)
           
 void set(OrganisationDb db)
           
 void set(Planner planner)
           
 void set(ProtocolDb protocolDb)
           
 void set(ResourceDb resourceDb)
           
 void set(ReteEngine reteEngine)
           
 void set(TaskDb taskDb)
           
 void set(ZeusExternal zeusExternal)
          the ZeusExternal is the user defined part of the agent that is called by the agent class when it is run
 void setAcceptTimeout(double val)
           
 void setAddressBookRefresh(double val)
           
 void setAddressTimeout(double val)
           
 void setExecuteEarliest(boolean execute_earliest)
           
 void setFacilitatorRefresh(double val)
           
 void setFacilitators(java.util.Vector input)
           
 void setFacilitatorTimeout(double val)
           
 void setNameservers(java.util.Vector input)
           
 void setRegistrationTimeout(double val)
           
 void setReplanPeriod(double val)
           
 void setSharePlan(boolean share_plan)
           
 TaskDb TaskDb()
           
 Time time(long ctm)
           
 java.lang.String whatami()
          return the type of agent, originally one of "Nameserver", "Facilitator", "Visualiser", "DbProxy" or "Agent"
 java.lang.String whereAmI()
          whereAmI should return the deployed address of the agent - probably implemented as a TCP/IP address .... would be better implemented from a config file
 java.lang.String whoami()
          return the name of the agent
 ZeusExternal ZeusExternal()
           
 

Method Detail

setFacilitators

public void setFacilitators(java.util.Vector input)

addFacilitator

public void addFacilitator(java.lang.String agent)

removeFacilitator

public void removeFacilitator(java.lang.String agent)

setNameservers

public void setNameservers(java.util.Vector input)

addNameserver

public void addNameserver(Address address)

removeNameserver

public void removeNameserver(java.lang.String address)

set

public void set(AddressBook addressBook)
set the addressBook for this agent


set

public void set(ProtocolDb protocolDb)

set

public void set(MailBox mbox)

set

public void set(MsgHandler msgHandler)

set

public void set(Engine engine)

set

public void set(ReteEngine reteEngine)

set

public void set(ExecutionMonitor monitor)

set

public void set(Planner planner)

set

public void set(OrganisationDb db)

set

public void set(TaskDb taskDb)

set

public void set(ResourceDb resourceDb)

set

public void set(OntologyDb ontologyDb)

set

public void set(BasicAgent agent)
set a reference to the agent object into this context object


set

public void set(BasicAgentUI agentUI)

set

public void set(ZeusExternal zeusExternal)
the ZeusExternal is the user defined part of the agent that is called by the agent class when it is run


set

public void set(ExternalDb externalDb)

set

public void set(Clock clock)
setting the clock is a vital activity for a Zeus agent, basically by getting a Clock that is set to the Agency time (provided by the ANServer) the agent are able to co-ordinate their actions


now

public double now()

currentTime

public Time currentTime()

time

public Time time(long ctm)

getClockStep

public long getClockStep()

newId

public java.lang.String newId()

newId

public java.lang.String newId(java.lang.String tag)

whatami

public java.lang.String whatami()
return the type of agent, originally one of "Nameserver", "Facilitator", "Visualiser", "DbProxy" or "Agent"


whoami

public java.lang.String whoami()
return the name of the agent


queryTable

public java.util.Hashtable queryTable()

facilitators

public java.util.Vector facilitators()

nameservers

public java.util.Vector nameservers()

AddressBook

public AddressBook AddressBook()

MailBox

public MailBox MailBox()

MsgHandler

public MsgHandler MsgHandler()

ReteEngine

public ReteEngine ReteEngine()

Engine

public Engine Engine()

ExecutionMonitor

public ExecutionMonitor ExecutionMonitor()

Planner

public Planner Planner()

OrganisationDb

public OrganisationDb OrganisationDb()

TaskDb

public TaskDb TaskDb()

ResourceDb

public ResourceDb ResourceDb()

OntologyDb

public OntologyDb OntologyDb()

ExternalDb

public ExternalDb ExternalDb()

ProtocolDb

public ProtocolDb ProtocolDb()

ZeusExternal

public ZeusExternal ZeusExternal()

AgentUI

public BasicAgentUI AgentUI()

Agent

public BasicAgent Agent()

GenSym

public GenSym GenSym()

Clock

public Clock Clock()

getQueryTable

public java.util.Hashtable getQueryTable()

getFacilitators

public java.util.Vector getFacilitators()

getNameservers

public java.util.Vector getNameservers()

getAddressBook

public AddressBook getAddressBook()

getMailBox

public MailBox getMailBox()

getMsgHandler

public MsgHandler getMsgHandler()

getReteEngine

public ReteEngine getReteEngine()

getEngine

public Engine getEngine()

getExecutionMonitor

public ExecutionMonitor getExecutionMonitor()

getPlanner

public Planner getPlanner()

getOrganisationDb

public OrganisationDb getOrganisationDb()

getTaskDb

public TaskDb getTaskDb()

getResourceDb

public ResourceDb getResourceDb()

getOntologyDb

public OntologyDb getOntologyDb()

getExternalDb

public ExternalDb getExternalDb()

getProtocolDb

public ProtocolDb getProtocolDb()

getZeusExternal

public ZeusExternal getZeusExternal()

getAgentUI

public BasicAgentUI getAgentUI()

getAgent

public BasicAgent getAgent()

getGenSym

public GenSym getGenSym()

getClock

public Clock getClock()

getTransportFactory

public TransportFactory getTransportFactory()

getSharePlan

public boolean getSharePlan()

getExecuteEarliest

public boolean getExecuteEarliest()

getAddressBookRefresh

public double getAddressBookRefresh()

getAddressTimeout

public double getAddressTimeout()

getReplanPeriod

public double getReplanPeriod()

getRegistrationTimeout

public double getRegistrationTimeout()

getFacilitatorTimeout

public double getFacilitatorTimeout()

getAcceptTimeout

public double getAcceptTimeout()

getFacilitatorRefresh

public double getFacilitatorRefresh()

setSharePlan

public void setSharePlan(boolean share_plan)

setExecuteEarliest

public void setExecuteEarliest(boolean execute_earliest)

setAddressBookRefresh

public void setAddressBookRefresh(double val)

setAddressTimeout

public void setAddressTimeout(double val)

setReplanPeriod

public void setReplanPeriod(double val)

setRegistrationTimeout

public void setRegistrationTimeout(double val)

setFacilitatorTimeout

public void setFacilitatorTimeout(double val)

setAcceptTimeout

public void setAcceptTimeout(double val)

setFacilitatorRefresh

public void setFacilitatorRefresh(double val)

getInTray

public InTray getInTray()

whereAmI

public java.lang.String whereAmI()
whereAmI should return the deployed address of the agent - probably implemented as a TCP/IP address .... would be better implemented from a config file



Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.