Package jadex.bdiv3x.features
Class BDIXLifecycleAgentFeature
- java.lang.Object
-
- jadex.bridge.component.impl.AbstractComponentFeature
-
- jadex.bridge.component.impl.ComponentLifecycleFeature
-
- jadex.bdiv3x.features.BDIXLifecycleAgentFeature
-
- All Implemented Interfaces:
jadex.bdiv3.features.impl.IInternalBDILifecycleFeature
,IComponentFeature
,ILifecycleComponentFeature
public class BDIXLifecycleAgentFeature extends jadex.bridge.component.impl.ComponentLifecycleFeature implements jadex.bdiv3.features.impl.IInternalBDILifecycleFeature
Feature that ensures the bdi behavior is started. Differs from pojo BDILifecycleAgentFeature by extending ComponentLifecycleFeature.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BDIXLifecycleAgentFeature.EndBehavior
Extracted end behavior.static class
BDIXLifecycleAgentFeature.StartBehavior
Extracted start behavior.
-
Field Summary
Fields Modifier and Type Field Description static IComponentFeatureFactory
FACTORY
The factory.protected boolean
inited
Is the agent inited and allowed to execute rules?protected boolean
shutdown
Is the agent in shutdown?.
-
Constructor Summary
Constructors Constructor Description BDIXLifecycleAgentFeature(IInternalAccess component, ComponentCreationInfo cinfo)
Factory method constructor for instance level.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Void>
body()
Execute the functional body of the agent.protected BDIXLifecycleAgentFeature.EndBehavior
createEndBehavior()
Create the end behavior.protected BDIXLifecycleAgentFeature.StartBehavior
createStartBehavior()
Create the start behavior.boolean
isInited()
Get the inited.boolean
isShutdown()
Get the shutdown.void
setInited(boolean inited)
The inited to set.void
setShutdown(boolean shutdown)
Set the shutdown.IFuture<java.lang.Void>
shutdown()
Start the end state.-
Methods inherited from class jadex.bridge.component.impl.ComponentLifecycleFeature
getInitialSteps, hasUserBody
-
-
-
-
Field Detail
-
FACTORY
public static final IComponentFeatureFactory FACTORY
The factory.
-
inited
protected boolean inited
Is the agent inited and allowed to execute rules?
-
shutdown
protected boolean shutdown
Is the agent in shutdown?.
-
-
Constructor Detail
-
BDIXLifecycleAgentFeature
public BDIXLifecycleAgentFeature(IInternalAccess component, ComponentCreationInfo cinfo)
Factory method constructor for instance level.
-
-
Method Detail
-
body
public IFuture<java.lang.Void> body()
Execute the functional body of the agent. Is only called once.- Specified by:
body
in interfaceIComponentFeature
- Overrides:
body
in classjadex.bridge.component.impl.ComponentLifecycleFeature
-
createStartBehavior
protected BDIXLifecycleAgentFeature.StartBehavior createStartBehavior()
Create the start behavior.
-
createEndBehavior
protected BDIXLifecycleAgentFeature.EndBehavior createEndBehavior()
Create the end behavior.
-
shutdown
public IFuture<java.lang.Void> shutdown()
Start the end state.- Specified by:
shutdown
in interfaceIComponentFeature
- Overrides:
shutdown
in classjadex.bridge.component.impl.ComponentLifecycleFeature
-
isInited
public boolean isInited()
Get the inited.- Specified by:
isInited
in interfacejadex.bdiv3.features.impl.IInternalBDILifecycleFeature
- Returns:
- The inited.
-
setInited
public void setInited(boolean inited)
The inited to set.- Specified by:
setInited
in interfacejadex.bdiv3.features.impl.IInternalBDILifecycleFeature
- Parameters:
inited
- The inited to set
-
isShutdown
public boolean isShutdown()
Get the shutdown.- Specified by:
isShutdown
in interfacejadex.bdiv3.features.impl.IInternalBDILifecycleFeature
- Returns:
- The shutdown
-
setShutdown
public void setShutdown(boolean shutdown)
Set the shutdown.- Specified by:
setShutdown
in interfacejadex.bdiv3.features.impl.IInternalBDILifecycleFeature
- Parameters:
shutdown
- The shutdown to set
-
-