ubiware.core.commands
Class RabRunnable
java.lang.Object
ubiware.core.AgentWrapper
ubiware.core.commands.RabRunnable
- All Implemented Interfaces:
- java.lang.Runnable
public abstract class RabRunnable
- extends AgentWrapper
- implements java.lang.Runnable
The extra point (compared to Runnable) is that inside the run method, the implementer has access to other methods provided by this class.
NEVER run 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
- Author:
- Michael Cochez for UBIWARE project
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Runnable |
run |
RabRunnable
public RabRunnable(UbiwareAgent myAgent)