/** * The agent body. */ @AgentBody public void body() { sayhello = "Hello BDI agent V3."; // System.out.println("body end: "+getClass().getName()); }
/** * The agent body. */ @AgentBody public void body() { if(agent==null) { throw new RuntimeException("Agent class was not enhaned but creation was initiated."); } } }
/** * The agent body. */ @AgentBody public void executeBody() { System.out.println("body"); } }
@AgentBody public void executeBody() { System.out.println("Time for a chat, buddy: "+ new Date(clockservice.getTime())); } }
/** * Plan body. */ @AgentBody public IFuture<Void> body() { System.out.println("Setting success: "+parent); parent.setSuccess(true); return IFuture.DONE; } }
/** * At startup register the agent at the DF. */ @AgentBody public IFuture<Void> executeBody() { this.reports = new ArrayList<TestReport>(); return registerDF(); }
/** * After starting, perform initial registration at server. */ @AgentBody public void executeBody() { super.executeBody(); sendInfo(false); }
/** * */ @AgentBody public void body() { testIntermediateFuture(); testTuple2Future(); }
/** * The agent body. */ @AgentBody public void body() { bdi.adoptPlan(new TranslationPlan()); }
/** * After starting, perform initial registration at server. */ @AgentBody public void executeBody() { super.executeBody(); sendInfo(false); }
@AgentBody public void body() { while(true) { System.out.println("headline is: "+headline); System.out.println("news are: "+news); agent.getComponentFeature(IExecutionFeature.class).waitForDelay(1000).get(); } } }
/** * Execute the agent */ @AgentBody public void execute(IInternalAccess agent) { List<TestReport> tests = new ArrayList<TestReport>(); runTests(agent, tests); runTests(agent, tests); // perform tests twice agent.getComponentFeature(IArgumentsResultsFeature.class).getResults().put("testresults", new Testcase(tests.size(), tests.toArray(new TestReport[tests.size()]))); }
/** * The agent body. */ @AgentBody() public IFuture<Void> body() { TestReport tr1 = test(1, ProviderAgent.class.getName()+".class"); agent.getComponentFeature(IArgumentsResultsFeature.class).getResults().put("testresults", new Testcase(1, new TestReport[]{tr1})); return IFuture.DONE; }
/** * The agent body. */ @AgentBody() public IFuture<Void> body() { TestReport tr1 = test(1, PojoProviderAgent.class.getName()+".class"); TestReport tr2 = test(2, MicroProviderAgent.class.getName()+".class"); agent.getComponentFeature(IArgumentsResultsFeature.class).getResults().put("testresults", new Testcase(2, new TestReport[]{tr1, tr2})); return IFuture.DONE; }
/** * The agent body. */ @AgentBody public void body() { agent.getComponentFeature(IBDIAgentFeature.class).adoptPlan("printHello").get(); }
/** * The agent body. */ @AgentBody public void body() { String eword = "dog"; String gword = (String)bdiFeature.dispatchTopLevelGoal(capa.new Translate(eword)).get(); System.out.println("Translated: "+eword+" "+gword); List<String> syns = (List<String>)bdiFeature.adoptPlan("findSynonyms", new Object[]{eword}).get(); System.out.println("Found synonyms: "+eword+" "+syns); }
/** * The agent body. */ @AgentBody public void body() { bdi.adoptPlan(new TranslatePlan("dog")); agent.getComponentFeature(IExecutionFeature.class).waitForDelay(1000).get(); context = false; System.out.println("context set to false"); }
/** * The agent body. */ @AgentBody public void body() { agent.getComponentFeature(IBDIAgentFeature.class).dispatchTopLevelGoal(new HelloGoal("Hello BDI agent V3.")).get(); // System.out.println("body end: "+getClass().getName()); }
/** * The agent body. */ @AgentBody public void body(IInternalAccess agent) { agent.getComponentFeature(IExecutionFeature.class).waitForDelay(1000).get(); tr.setFailed("Plan was not triggered."); agent.killComponent(); }
/** * Execute the agent */ @AgentBody public void execute(final IInternalAccess agent) { agent.getComponentFeature(IExecutionFeature.class).waitForDelay(500).get(); agent.getComponentFeature(IArgumentsResultsFeature.class).getResults().put("testresults", new Testcase(1, new TestReport[]{new TestReport("#1", "Test blocking wait.", true, null)})); } }