|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agentfactory.cldc.Service
com.agentfactory.cldc.name_service.UniqueNameService
public class UniqueNameService
The unique name service is responsible for updating local agent names so as that they are globally unique. A remote server is contacted to obtain a globally unique value. This value is appended to a local agent name to ensure that the name is unique.
| Constructor Summary | |
|---|---|
UniqueNameService(java.lang.String[] args,
java.lang.Object[] agtNms,
Scheduler scheduler)
Creates a new instance of UniqueNameService. |
|
| Method Summary | |
|---|---|
void |
modifyBinding(java.lang.Object oldName,
java.lang.Object newName)
Changes the name of an agent in the service's registry if one exists. |
FOS |
processAction(AgentName agentName,
int actionID,
FOS data)
This method is used to determine what agent names have to be update and subsequently when a unique value has been obtained to update that relevant names. |
FOS |
processPer(AgentName agentName,
int perceptionID)
Perceives information from within the service. |
void |
run()
In the unique name service the run method is blank. |
| Methods inherited from class com.agentfactory.cldc.Service |
|---|
register |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UniqueNameService(java.lang.String[] args,
java.lang.Object[] agtNms,
Scheduler scheduler)
args - a string of arugments passed to the service.agtNms - an array of agent name.scheduler - a reference to the scheduler.| Method Detail |
|---|
public void modifyBinding(java.lang.Object oldName,
java.lang.Object newName)
Service
modifyBinding in class ServiceoldName - the old name of the agent.newName - the new name of the agent.
public FOS processPer(AgentName agentName,
int perceptionID)
throws MalformedLogicException
Service
processPer in class ServiceagentName - the agent that wishes to perceive the information.perceptionID - the ID of the information that is to be perceived.
MalformedLogicException - if there is a logic error.
public FOS processAction(AgentName agentName,
int actionID,
FOS data)
throws MalformedLogicException
processAction in class ServiceagentName - the name of the agent calling service.actionID - the id of the action to perform.data - the data to be used within an action.
MalformedLogicException - if there is a logic error.public void run()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||