Package jadex.bdi.runtime.impl
Class BDILifecycleAgentFeature
java.lang.Object
jadex.micro.impl.MicroAgentFeature
jadex.bdi.runtime.impl.BDILifecycleAgentFeature
- All Implemented Interfaces:
IInternalBDILifecycleFeature,jadex.execution.impl.ILifecycle
public class BDILifecycleAgentFeature
extends jadex.micro.impl.MicroAgentFeature
implements IInternalBDILifecycleFeature
Feature that ensures the agent created(), body() and killed() are called on the pojo.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classExtracted start behavior.static classCondition that tests if an expression evalutes to true.static classExtracted start behavior.static classExtracted start behavior. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanIs the agent inited and allowed to execute rules?protected booleanIs the agent in shutdown?.Fields inherited from class jadex.micro.impl.MicroAgentFeature
self -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBDILifecycleAgentFeature(jadex.micro.MicroAgent self) Instantiate the feature. -
Method Summary
Modifier and TypeMethodDescriptionprotected BDILifecycleAgentFeature.EndBehaviorCreate the end behavior.protected BDILifecycleAgentFeature.StartBehaviorCreate the start behavior.static booleanevaluateCondition(MCondition cond, MElement owner, Map<String, Object> vals) Evaluate the condition.protected static booleanexecuteGoalMethod(Method m, RProcessableElement goal, jadex.rules.eca.IEvent event) Execute a goal method.static booleaninvokeBooleanMethod(Object pojo, Method m, MElement modelelement, jadex.rules.eca.IEvent event, RPlan rplan) Assemble fitting parameters from context and invoke a boolean method.booleanisInited()Get the inited.booleanGet the shutdown.jadex.future.IFuture<Void>onEnd()jadex.future.IFuture<Void>onStart()Execute the functional body of the agent.voidsetInited(boolean inited) The inited to set.voidsetShutdown(boolean shutdown) Set the shutdown.Methods inherited from class jadex.micro.impl.MicroAgentFeature
get, getSelf, injectStuff, invokeMethod, setFieldValue
-
Field Details
-
inited
protected boolean initedIs the agent inited and allowed to execute rules? -
shutdown
protected boolean shutdownIs the agent in shutdown?.
-
-
Constructor Details
-
BDILifecycleAgentFeature
protected BDILifecycleAgentFeature(jadex.micro.MicroAgent self) Instantiate the feature.
-
-
Method Details
-
onStart
Execute the functional body of the agent. Is only called once.- Specified by:
onStartin interfacejadex.execution.impl.ILifecycle- Overrides:
onStartin classjadex.micro.impl.MicroAgentFeature
-
createStartBehavior
Create the start behavior. -
createEndBehavior
Create the end behavior. -
onEnd
- Specified by:
onEndin interfacejadex.execution.impl.ILifecycle- Overrides:
onEndin classjadex.micro.impl.MicroAgentFeature
-
executeGoalMethod
protected static boolean executeGoalMethod(Method m, RProcessableElement goal, jadex.rules.eca.IEvent event) Execute a goal method. -
invokeBooleanMethod
public static boolean invokeBooleanMethod(Object pojo, Method m, MElement modelelement, jadex.rules.eca.IEvent event, RPlan rplan) Assemble fitting parameters from context and invoke a boolean method. -
isInited
public boolean isInited()Get the inited.- Specified by:
isInitedin interfaceIInternalBDILifecycleFeature- Returns:
- The inited.
-
setInited
public void setInited(boolean inited) The inited to set.- Specified by:
setInitedin interfaceIInternalBDILifecycleFeature- Parameters:
inited- The inited to set
-
isShutdown
public boolean isShutdown()Get the shutdown.- Specified by:
isShutdownin interfaceIInternalBDILifecycleFeature- Returns:
- The shutdown
-
setShutdown
public void setShutdown(boolean shutdown) Set the shutdown.- Specified by:
setShutdownin interfaceIInternalBDILifecycleFeature- Parameters:
shutdown- The shutdown to set
-
evaluateCondition
Evaluate the condition.- Returns:
-