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 class
Extracted start behavior.static class
Condition that tests if an expression evalutes to true.static class
Extracted start behavior.static class
Extracted start behavior. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Is the agent inited and allowed to execute rules?protected boolean
Is the agent in shutdown?.Fields inherited from class jadex.micro.impl.MicroAgentFeature
self
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BDILifecycleAgentFeature
(jadex.micro.MicroAgent self) Instantiate the feature. -
Method Summary
Modifier and TypeMethodDescriptionprotected BDILifecycleAgentFeature.EndBehavior
Create the end behavior.protected BDILifecycleAgentFeature.StartBehavior
Create the start behavior.static boolean
evaluateCondition
(MCondition cond, MElement owner, Map<String, Object> vals) Evaluate the condition.protected static boolean
executeGoalMethod
(Method m, RProcessableElement goal, jadex.rules.eca.IEvent event) Execute a goal method.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.boolean
isInited()
Get the inited.boolean
Get the shutdown.jadex.future.IFuture
<Void> onEnd()
jadex.future.IFuture
<Void> onStart()
Execute the functional body of the agent.void
setInited
(boolean inited) The inited to set.void
setShutdown
(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:
onStart
in interfacejadex.execution.impl.ILifecycle
- Overrides:
onStart
in classjadex.micro.impl.MicroAgentFeature
-
createStartBehavior
Create the start behavior. -
createEndBehavior
Create the end behavior. -
onEnd
- Specified by:
onEnd
in interfacejadex.execution.impl.ILifecycle
- Overrides:
onEnd
in 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:
isInited
in interfaceIInternalBDILifecycleFeature
- Returns:
- The inited.
-
setInited
public void setInited(boolean inited) The inited to set.- Specified by:
setInited
in interfaceIInternalBDILifecycleFeature
- Parameters:
inited
- The inited to set
-
isShutdown
public boolean isShutdown()Get the shutdown.- Specified by:
isShutdown
in interfaceIInternalBDILifecycleFeature
- Returns:
- The shutdown
-
setShutdown
public void setShutdown(boolean shutdown) Set the shutdown.- Specified by:
setShutdown
in interfaceIInternalBDILifecycleFeature
- Parameters:
shutdown
- The shutdown to set
-
evaluateCondition
Evaluate the condition.- Returns:
-