|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectubiware.core.AgentWrapper
public class AgentWrapper
NEVER use this class from inside the UbiwareAgent thread (This means, not from in the thread which goes trough RAB's) This will cause a deadlock! Use in a newly created thread. example:
class RabRunnableExampleBehavior extends ReusableAtomicBehavior {
protected void doAction() {
//........
new Thread(new RabRunnable(this.myAgent) {
public void run() {
//access to the agents beliefs
this.AddBeliefsN3Blocking(":bill :hasSon :John");
//in the next line, we're sure that the beliefs have been added, since this was the blocking variety!
}
}).start();
//..........
}
protected void initializeRAB(BehaviorStartParameters parameters) throws IllegalParameterConfigurationException {...}
}
15.3.2010
| Constructor Summary | |
|---|---|
AgentWrapper(UbiwareAgent myAgent)
|
|
| Method Summary | |
|---|---|
void |
addBeliefsN3(ubiware.util.saplbuilder.SaplDocument doc)
Add beliefs to the agent, after this call returns, it is guaranteed that the beliefs will be added in the future. |
boolean |
addBeliefsN3Blocking(ubiware.util.saplbuilder.SaplDocument doc)
Add beliefs to the agent, after this call returns, the beliefs are added to the agents beliefs. |
void |
addCommand(UbiwareAgentCommand<?> command)
Adds a command to the agent which will be executed in the future. |
BindingsSet |
hasBeliefsN3Blocking(ubiware.util.saplbuilder.SaplDocument n3string)
Check whether the agent has a certain belief and get values bound to variables. |
void |
removeBeliefsN3(ubiware.util.saplbuilder.SaplDocument n3String)
Removes beliefs from the agent, after this call returns, it is guaranteed that the beliefs will be removed in the future. |
void |
removeBeliefsN3Blocking(ubiware.util.saplbuilder.SaplDocument n3string)
Remove beliefs from the agent, after this call returns, the beliefs are removed from the agents beliefs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AgentWrapper(UbiwareAgent myAgent)
| Method Detail |
|---|
public void addCommand(UbiwareAgentCommand<?> command)
command - The command for the Ubiware agentUbiwareAgent.addCommand(UbiwareAgentCommand)public void addBeliefsN3(ubiware.util.saplbuilder.SaplDocument doc)
n3string - UbiwareAgent.addBeliefsN3(String)public boolean addBeliefsN3Blocking(ubiware.util.saplbuilder.SaplDocument doc)
n3string - UbiwareAgent.addBeliefsN3(String)
UbiwareAgent.addBeliefsN3(String)public void removeBeliefsN3(ubiware.util.saplbuilder.SaplDocument n3String)
n3String - UbiwareAgent.removeBeliefsN3(String)public void removeBeliefsN3Blocking(ubiware.util.saplbuilder.SaplDocument n3string)
n3string - UbiwareAgent.removeBeliefsN3(String)public BindingsSet hasBeliefsN3Blocking(ubiware.util.saplbuilder.SaplDocument n3string)
n3string - UbiwareAgent.hasBeliefsN3(String)
UbiwareAgent.hasBeliefsN3(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||