Package jadex.bridge.component.impl
Class ComponentLifecycleFeature
- java.lang.Object
-
- jadex.bridge.component.impl.AbstractComponentFeature
-
- jadex.bridge.component.impl.ComponentLifecycleFeature
-
- All Implemented Interfaces:
IComponentFeature
,ILifecycleComponentFeature
public class ComponentLifecycleFeature extends AbstractComponentFeature implements ILifecycleComponentFeature
Feature that ensures the agent created(), body() and killed() are called on the pojo.
-
-
Field Summary
Fields Modifier and Type Field Description static IComponentFeatureFactory
FACTORY
The factory.-
Fields inherited from class jadex.bridge.component.impl.AbstractComponentFeature
cinfo, component, guesser
-
-
Constructor Summary
Constructors Constructor Description ComponentLifecycleFeature(IInternalAccess component, ComponentCreationInfo cinfo)
Factory method constructor for instance level.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jadex.commons.future.IFuture<java.lang.Void>
body()
Execute the functional body of the component.protected jadex.bridge.modelinfo.UnparsedExpression[]
getInitialSteps()
Get the initial steps from the model.boolean
hasUserBody()
Run body on separate thread if there are initial (user) steps in model.jadex.commons.future.IFuture<java.lang.Void>
shutdown()
Called just before the component is removed from the platform.-
Methods inherited from class jadex.bridge.component.impl.AbstractComponentFeature
getClockService, getComponent, getExecutionService, getExternalFacade, getExternalFacadeType, getInternalAccess, getParameterGuesser, getValueFetcher, init, kill
-
-
-
-
Field Detail
-
FACTORY
public static final IComponentFeatureFactory FACTORY
The factory.
-
-
Constructor Detail
-
ComponentLifecycleFeature
public ComponentLifecycleFeature(IInternalAccess component, ComponentCreationInfo cinfo)
Factory method constructor for instance level.
-
-
Method Detail
-
hasUserBody
public boolean hasUserBody()
Run body on separate thread if there are initial (user) steps in model.- Specified by:
hasUserBody
in interfaceIComponentFeature
- Overrides:
hasUserBody
in classAbstractComponentFeature
-
body
public jadex.commons.future.IFuture<java.lang.Void> body()
Execute the functional body of the component. Is only called once.- Specified by:
body
in interfaceIComponentFeature
- Overrides:
body
in classAbstractComponentFeature
-
shutdown
public jadex.commons.future.IFuture<java.lang.Void> shutdown()
Called just before the component is removed from the platform.- Specified by:
shutdown
in interfaceIComponentFeature
- Overrides:
shutdown
in classAbstractComponentFeature
-
getInitialSteps
protected jadex.bridge.modelinfo.UnparsedExpression[] getInitialSteps()
Get the initial steps from the model.
-
-