|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--cia.agent.PersonalAgent
this class represents the abstract agent class. This must be the base class of all cia agents being located within an agent cluster.
AgentBusFactory| Field Summary | |
protected boolean |
isDone
|
| Constructor Summary | |
PersonalAgent()
Creates the personal agent. |
|
| Method Summary | |
void |
addRole(AgentRole role)
adds an agent role to the agent, i.e. mobility role, control role. |
AgentBusFactory |
getAgentBusFactory()
returns the agent bus factory |
AgentURL |
getAgentURL()
returns the agents' url |
java.lang.String |
getName()
returns the name of the agent. |
AgentRole |
getRole(java.lang.String name)
returns a specific role of an agent. |
void |
init()
adds the control role to the personal agent. |
static void |
main(java.lang.String[] args)
starts a new personal agent. |
boolean |
removeRole(java.lang.String name)
removes a role from an agent. |
void |
run()
implements the run method of the runnable interface. |
void |
setAgentBusFactory(AgentBusFactory abusFactory)
sets the agent bus factory. |
void |
setAgentURL(AgentURL clusterURL)
sets the agent url. |
void |
stop()
stops the agent. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected boolean isDone
| Constructor Detail |
public PersonalAgent()
| Method Detail |
public java.lang.String getName()
public AgentURL getAgentURL()
public AgentBusFactory getAgentBusFactory()
public void setAgentURL(AgentURL clusterURL)
clusterURL - an agentURL; will be cut to the clusterURLpublic void setAgentBusFactory(AgentBusFactory abusFactory)
abusFactory - the agent bus factorypublic void addRole(AgentRole role)
If a role has a specific interface, the agent programmer should hold the role in a member variable as well. Roles without specific interface can be applied dynamically by the cluster.
role - the role to be added.Agent.addRole(cia.agent.AgentRole)
public AgentRole getRole(java.lang.String name)
throws java.util.NoSuchElementException
name - (actually) the classname of the role.public boolean removeRole(java.lang.String name)
name - (actually) the classname of the role.public void init()
public void run()
public void stop()
throws java.lang.IllegalMonitorStateException
public static void main(java.lang.String[] args)
args - commandline arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||