Package jadex.bdiv3.examples.helloworld
Class HelloWorld
- java.lang.Object
-
- jadex.bdiv3.examples.helloworld.HelloWorld
-
public class HelloWorld extends java.lang.Object
Hello World with goal driven print out. class is checked for annotations goal, plan type declarations from annotations or inline plans are added to the agent type and conditions to eca rule system class is rewritten to announce belief changes (field accesses and annotated methods)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
HelloWorld.HelloGoal
Simple hello world goal.
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccess
agent
The bdi agent.
-
Constructor Summary
Constructors Constructor Description HelloWorld()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
body()
The agent body.protected IFuture<java.lang.Void>
printHello1(HelloWorld.HelloGoal goal)
First plan.protected IFuture<java.lang.Void>
printHello2(HelloWorld.HelloGoal goal)
Second plan.protected IFuture<java.lang.Void>
printHello3(HelloWorld.HelloGoal goal)
Third plan.
-
-
-
Field Detail
-
agent
protected IInternalAccess agent
The bdi agent.
-
-
Method Detail
-
body
public void body()
The agent body. body is executed changes variable value (sayhello=true) notification is sent to eca rule system rule system finds creation condition of goal and executes it right hand side creates goal and executes it Plan is selected and executed (hello is printed out)
-
printHello1
protected IFuture<java.lang.Void> printHello1(HelloWorld.HelloGoal goal)
First plan. Fails with exception.
-
printHello2
protected IFuture<java.lang.Void> printHello2(HelloWorld.HelloGoal goal)
Second plan. Fails 'asynchronously' (i.e. exception in future).
-
printHello3
protected IFuture<java.lang.Void> printHello3(HelloWorld.HelloGoal goal)
Third plan. Prints out goal text and passes.
-
-