Package jadex.bdi.testcases
Class AbstractMultipleAgentsPlan
- java.lang.Object
-
- jadex.bdiv3x.runtime.Plan
-
- jadex.bdi.testcases.AbstractMultipleAgentsPlan
-
- Direct Known Subclasses:
CNPTestPlan
,DATestPlan
,EATestPlan
,ICNPTestPlan
,MessageForwardPlan
,PingTestPlan
,QPTestPlan
,RPTestPlan
,WatchdogTestPlan
public abstract class AbstractMultipleAgentsPlan extends Plan
Base class for test plans that create other agents.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jadex.bdiv3x.runtime.Plan
Plan.PlanWaitAbstraction
-
-
Constructor Summary
Constructors Constructor Description AbstractMultipleAgentsPlan()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
aborted()
The plan was aborted (because of conditional goal success or termination from outside).protected boolean
assureTest(TestReport tr)
Assure that all agents needed for test are there.protected java.util.List<IComponentIdentifier>
createAgents(java.lang.String type, java.lang.String config, java.util.Map<java.lang.String,java.lang.Object>[] args)
Create agents of a given type with given arguments.protected java.util.List<IComponentIdentifier>
createAgents(java.lang.String type, java.util.Map<java.lang.String,java.lang.Object>[] args)
Create agents of a given type with given arguments.protected void
destroyAgents()
Destroy the agents.void
failed()
The failed method is called on plan failure/abort.void
passed()
The passed method is called on plan success.-
Methods inherited from class jadex.bdiv3x.runtime.Plan
body, checkNotInAtomic, createExpression, createGoal, createInternalEvent, createMessageEvent, dispatchInternalEvent, dispatchSubgoal, dispatchSubgoalAndWait, dispatchSubgoalAndWait, dispatchTopLevelGoal, endAtomic, fail, fail, fail, getAgent, getBeliefbase, getClock, getComponentDescription, getComponentIdentifier, getComponentName, getDispatchedElement, getEventbase, getException, getExpression, getExpressionbase, getExternalAccess, getGoalbase, getLogger, getParameter, getParameters, getParameterSet, getParameterSets, getPlanbase, getPlanElement, getReason, getRPlan, getScope, getTime, getWaitqueue, hasParameter, hasParameterSet, killAgent, sendMessage, sendMessageAndWait, sendMessageAndWait, startAtomic, toString, waitFor, waitForCondition, waitForCondition, waitForCondition, waitForConditionInline, waitForConditionInline, waitForEver, waitForFactAdded, waitForFactAdded, waitForFactChanged, waitForFactChanged, waitForFactRemoved, waitForFactRemoved, waitForGoalFinished, waitForGoalFinished, waitForGoalFinished, waitForGoalFinished, waitForInternalEvent, waitForInternalEvent, waitForMessageEvent, waitForMessageEvent, waitForReply, waitForReply, waitForReply, waitForReply, waitForTick
-
-
-
-
Field Detail
-
agents
protected java.util.List<IComponentIdentifier> agents
The list of agents.
-
agent_cnt
protected int agent_cnt
The intended number of agents.
-
-
Method Detail
-
createAgents
protected java.util.List<IComponentIdentifier> createAgents(java.lang.String type, java.util.Map<java.lang.String,java.lang.Object>[] args)
Create agents of a given type with given arguments.- Parameters:
type
- The type.args
- The args.
-
createAgents
protected java.util.List<IComponentIdentifier> createAgents(java.lang.String type, java.lang.String config, java.util.Map<java.lang.String,java.lang.Object>[] args)
Create agents of a given type with given arguments.- Parameters:
type
- The type.config
- The configuration.args
- The args.
-
destroyAgents
protected void destroyAgents()
Destroy the agents.
-
assureTest
protected boolean assureTest(TestReport tr)
Assure that all agents needed for test are there.- Parameters:
tr
- The test report.- Returns:
- True, if test can be performed.
-
passed
public void passed()
The passed method is called on plan success.
-
failed
public void failed()
The failed method is called on plan failure/abort.
-
-