|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectzeus.actors.ZeusAgentContext
Every Zeus Agent possesses one implementation of the AgentContext interface whose role is to hold references to the objects that implement the agent's internal components.
ZeusAgentContext is the default implementation that is used for normal agents generated by the AgentGenerator. All of the components of an agent that we have implemented so far are expected to be present in an agent of this sort. Changes Simon adds whereAmI() to allow service descriptions to be done 22/9/02
| Field Summary | |
double |
accept_timeout
|
double |
address_timeout
|
protected AddressBook |
addressBook
Stores agent identities and the location the agent believes they currenty reside at |
double |
addressbook_refresh
|
protected BasicAgent |
agent
A reference to a class implementing some shared agent methods |
protected BasicAgentUI |
agentUI
A reference to the AgentViewer class that provides a visual depiction of the state of the agent's components |
protected Clock |
clock
The agent's local time-keeping model |
protected Engine |
engine
The co-ordination engine component, this drives the agent's social and problem solving behaviour |
boolean |
execute_earliest
|
protected ExternalDb |
externalDb
A reference to an implementation of wrapper class that connects the agent with an external data source (like a database) |
double |
facilitator_refresh
|
double |
facilitator_timeout
|
protected java.util.Vector |
facilitators
Stores the agent's own list of known Facilitators |
protected GenSym |
genSym
The agent's local unique identifier generator |
protected MailBox |
mbox
The component that implements the agent's communication mechanism |
protected ExecutionMonitor |
monitor
This component monitors the state of the tasks executed by the agent |
protected MsgHandler |
msgHandler
The component that determines what actions are performed on the receipt of messages |
protected java.lang.String |
name
The agent's identity - this should be unique |
protected java.util.Vector |
nameservers
Stores the agent's own list of known Name Servers |
protected OntologyDb |
ontologyDb
This holds the agents local copy of the concepts that form the application ontology |
protected OrganisationDb |
organisationDb
This stores the organisational relationships believed by the agent |
protected Planner |
planner
This component maintains and enacts the agent's diary of schedules goals |
protected ProtocolDb |
protocolDb
This stores the protocols and strategies known the agent |
protected java.util.Hashtable |
queryTable
Internal variable used by co-ordination engine components |
double |
registration_timeout
|
double |
replan_period
|
protected ResourceDb |
resourceDb
This stores the resource objects currently owned by the agent |
protected ReteEngine |
reteEngine
A rule engine based on the classic Rete Algorithm |
boolean |
share_plan
|
protected TaskDb |
taskDb
This stores the definitions of the tasks the agent knows it is capable of performing |
protected java.lang.String |
type
The agent's functional type: one of "Nameserver", "Facilitator", "Visualiser", "DbProxy" or "Agent" |
protected ZeusExternal |
zeusExternal
A reference to the class that implements the agent's external interface, this is typically used to connect GUI front-ends to the agent. |
| Constructor Summary | |
ZeusAgentContext(java.lang.String name,
java.lang.String type)
class constructor |
|
| 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()
return the inTray for this agent |
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()
use the getTransportFactory to get a transportFactory that your agent can use to get a message transport for a particular address that it wants to send a message to. |
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 - implemented as a TCP/IP address .... |
java.lang.String |
whoami()
return the name of the agent |
ZeusExternal |
ZeusExternal()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public boolean share_plan
public boolean execute_earliest
public double registration_timeout
public double facilitator_timeout
public double address_timeout
public double accept_timeout
public double addressbook_refresh
public double facilitator_refresh
public double replan_period
protected java.util.Vector nameservers
protected java.util.Vector facilitators
protected AddressBook addressBook
protected MailBox mbox
protected MsgHandler msgHandler
protected ReteEngine reteEngine
protected Engine engine
protected ExecutionMonitor monitor
protected Planner planner
protected OrganisationDb organisationDb
protected TaskDb taskDb
protected ResourceDb resourceDb
protected OntologyDb ontologyDb
protected ExternalDb externalDb
protected ZeusExternal zeusExternal
protected BasicAgent agent
protected BasicAgentUI agentUI
protected ProtocolDb protocolDb
protected GenSym genSym
protected Clock clock
protected java.lang.String name
protected java.lang.String type
protected java.util.Hashtable queryTable
| Constructor Detail |
public ZeusAgentContext(java.lang.String name,
java.lang.String type)
name - is a string containing the name of the agent (ie. "myAgent") which must be
unique in this naming spacetype - is the type of the agent - usually something like "ANServer","Facilitator" or
"FIPA_IIOP"If either of these two parameters are null an IllegalArguementException will be thrown.
TO DO: the IllegalArguementException should be part of the method declaration.
| Method Detail |
public boolean getSharePlan()
getSharePlan in interface AgentContextpublic boolean getExecuteEarliest()
getExecuteEarliest in interface AgentContextpublic double getAddressBookRefresh()
getAddressBookRefresh in interface AgentContextpublic double getAddressTimeout()
getAddressTimeout in interface AgentContextpublic double getReplanPeriod()
getReplanPeriod in interface AgentContextpublic double getRegistrationTimeout()
getRegistrationTimeout in interface AgentContextpublic double getFacilitatorTimeout()
getFacilitatorTimeout in interface AgentContextpublic double getAcceptTimeout()
getAcceptTimeout in interface AgentContextpublic double getFacilitatorRefresh()
getFacilitatorRefresh in interface AgentContextpublic void setSharePlan(boolean share_plan)
setSharePlan in interface AgentContextpublic void setExecuteEarliest(boolean execute_earliest)
setExecuteEarliest in interface AgentContextpublic void setAddressBookRefresh(double val)
setAddressBookRefresh in interface AgentContextpublic void setAddressTimeout(double val)
setAddressTimeout in interface AgentContextpublic void setReplanPeriod(double val)
setReplanPeriod in interface AgentContextpublic void setRegistrationTimeout(double val)
setRegistrationTimeout in interface AgentContextpublic void setFacilitatorTimeout(double val)
setFacilitatorTimeout in interface AgentContextpublic void setAcceptTimeout(double val)
setAcceptTimeout in interface AgentContextpublic void setFacilitatorRefresh(double val)
setFacilitatorRefresh in interface AgentContextpublic void setFacilitators(java.util.Vector input)
setFacilitators in interface AgentContextpublic void addFacilitator(java.lang.String agent)
addFacilitator in interface AgentContextpublic void removeFacilitator(java.lang.String agent)
removeFacilitator in interface AgentContextpublic void setNameservers(java.util.Vector input)
setNameservers in interface AgentContextpublic void addNameserver(Address address)
addNameserver in interface AgentContextpublic void removeNameserver(java.lang.String address)
removeNameserver in interface AgentContextpublic void set(AddressBook addressBook)
AgentContext
set in interface AgentContextpublic void set(ProtocolDb protocolDb)
set in interface AgentContextpublic void set(MailBox mbox)
set in interface AgentContextpublic void set(MsgHandler msgHandler)
set in interface AgentContextpublic void set(Engine engine)
set in interface AgentContextpublic void set(ReteEngine reteEngine)
set in interface AgentContextpublic void set(ExecutionMonitor monitor)
set in interface AgentContextpublic void set(Planner planner)
set in interface AgentContextpublic void set(OrganisationDb db)
set in interface AgentContextpublic void set(TaskDb taskDb)
set in interface AgentContextpublic void set(ResourceDb resourceDb)
set in interface AgentContextpublic void set(OntologyDb ontologyDb)
set in interface AgentContextpublic void set(BasicAgent agent)
AgentContext
set in interface AgentContextpublic void set(BasicAgentUI agentUI)
set in interface AgentContextpublic void set(ZeusExternal zeusExternal)
AgentContext
set in interface AgentContextpublic void set(ExternalDb externalDb)
set in interface AgentContextpublic void set(Clock clock)
AgentContext
set in interface AgentContextpublic double now()
now in interface AgentContextpublic Time currentTime()
currentTime in interface AgentContextpublic Time time(long ctm)
time in interface AgentContextpublic long getClockStep()
getClockStep in interface AgentContextpublic java.lang.String newId()
newId in interface AgentContextpublic java.lang.String newId(java.lang.String tag)
newId in interface AgentContextpublic java.lang.String whatami()
AgentContext
whatami in interface AgentContextpublic java.lang.String whoami()
AgentContext
whoami in interface AgentContextpublic java.util.Hashtable queryTable()
queryTable in interface AgentContextpublic java.util.Vector facilitators()
facilitators in interface AgentContextpublic java.util.Vector nameservers()
nameservers in interface AgentContextpublic AddressBook AddressBook()
AddressBook in interface AgentContextpublic MailBox MailBox()
MailBox in interface AgentContextpublic MsgHandler MsgHandler()
MsgHandler in interface AgentContextpublic ReteEngine ReteEngine()
ReteEngine in interface AgentContextpublic Engine Engine()
Engine in interface AgentContextpublic ExecutionMonitor ExecutionMonitor()
ExecutionMonitor in interface AgentContextpublic Planner Planner()
Planner in interface AgentContextpublic OrganisationDb OrganisationDb()
OrganisationDb in interface AgentContextpublic TaskDb TaskDb()
TaskDb in interface AgentContextpublic ResourceDb ResourceDb()
ResourceDb in interface AgentContextpublic OntologyDb OntologyDb()
OntologyDb in interface AgentContextpublic ExternalDb ExternalDb()
ExternalDb in interface AgentContextpublic ProtocolDb ProtocolDb()
ProtocolDb in interface AgentContextpublic ZeusExternal ZeusExternal()
ZeusExternal in interface AgentContextpublic BasicAgentUI AgentUI()
AgentUI in interface AgentContextpublic BasicAgent Agent()
Agent in interface AgentContextpublic GenSym GenSym()
GenSym in interface AgentContextpublic Clock Clock()
Clock in interface AgentContextpublic java.util.Hashtable getQueryTable()
getQueryTable in interface AgentContextpublic java.util.Vector getFacilitators()
getFacilitators in interface AgentContextpublic java.util.Vector getNameservers()
getNameservers in interface AgentContextpublic AddressBook getAddressBook()
getAddressBook in interface AgentContextpublic MailBox getMailBox()
getMailBox in interface AgentContextpublic MsgHandler getMsgHandler()
getMsgHandler in interface AgentContextpublic ReteEngine getReteEngine()
getReteEngine in interface AgentContextpublic Engine getEngine()
getEngine in interface AgentContextpublic ExecutionMonitor getExecutionMonitor()
getExecutionMonitor in interface AgentContextpublic Planner getPlanner()
getPlanner in interface AgentContextpublic OrganisationDb getOrganisationDb()
getOrganisationDb in interface AgentContextpublic TaskDb getTaskDb()
getTaskDb in interface AgentContextpublic ResourceDb getResourceDb()
getResourceDb in interface AgentContextpublic OntologyDb getOntologyDb()
getOntologyDb in interface AgentContextpublic ExternalDb getExternalDb()
getExternalDb in interface AgentContextpublic ProtocolDb getProtocolDb()
getProtocolDb in interface AgentContextpublic ZeusExternal getZeusExternal()
getZeusExternal in interface AgentContextpublic BasicAgentUI getAgentUI()
getAgentUI in interface AgentContextpublic BasicAgent getAgent()
getAgent in interface AgentContextpublic GenSym getGenSym()
getGenSym in interface AgentContextpublic Clock getClock()
getClock in interface AgentContextpublic TransportFactory getTransportFactory()
Once you have the TransportFactory you will be able to use it to get the specific transport (OutTray) that you need
getTransportFactory in interface AgentContextOutTray,
zeus.actors.service.TransportFactory,
zeus.actors.service.IIOP_Z_HTTP_TransportFactorypublic InTray getInTray()
getInTray in interface AgentContextpublic java.lang.String whereAmI()
whereAmI in interface AgentContext
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||