Package jadex.bridge.component.impl
Class ExecutionComponentFeature
- java.lang.Object
-
- jadex.bridge.component.impl.AbstractComponentFeature
-
- jadex.bridge.component.impl.ExecutionComponentFeature
-
- All Implemented Interfaces:
IComponentFeature
,IExecutionFeature
,IExternalComponentFeature
,IExternalExecutionFeature
,IInternalExecutionFeature
,jadex.commons.concurrent.IExecutable
public class ExecutionComponentFeature extends AbstractComponentFeature implements IExecutionFeature, IInternalExecutionFeature, jadex.commons.concurrent.IExecutable
This feature provides component step execution.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExecutionComponentFeature.ExecuteWaitForStep
Step to execute a wait for entry.static class
ExecutionComponentFeature.StepInfo
Info struct for steps.protected class
ExecutionComponentFeature.TimerWrapper
Wrap a timer and remove it from the agent when it is cancelled.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Object,jadex.commons.concurrent.Executor>
blocked
The blocked threads by monitor.protected int
bpstepid
The id of the step at which the execution was stopped because of a breakpoint.protected java.lang.Thread
componentthread
The thread currently executing the component (null for none).protected boolean
debug
Heisenbug debug flag cached for speed.static boolean
DEBUG
Debug flag.protected ExecutionComponentFeature.StepInfo
debugstep
protected jadex.commons.future.Future<java.lang.Void>
endagenda
Future for signalling that end of agenda execution has been reached.protected int
endstepcnt
The step at which the endstate begins.protected boolean
executing
Flag for testing double execution.protected boolean
isonrescue
Running on rescue thread?protected boolean
manual
Flag to indicate bootstrapping execution of main thread (only for platform, hack???).protected IInternalExecutionFeature
parenta
The parent adapter (cached for speed).protected java.lang.Thread
rescuethread
Is the current thread the rescue thread?protected java.lang.Throwable
stacktrace
Exception for debugging double execution.protected java.util.Map<IComponentStep<?>,java.lang.Exception>
stepadditions
protected int
stepcnt
The stepcnt - used to keep insertion order of same priority elements in the queue.protected jadex.commons.future.Future<java.lang.Void>
stepfuture
The future to be informed, when the requested step is finished.protected java.lang.String
stepinfo
The flag for a requested step (true when a step is allowed in stepwise execution).protected java.util.TreeSet<ExecutionComponentFeature.StepInfo>
steps
The component steps.protected java.util.Set<IInternalExecutionFeature>
subcomponents
The synchronous subcomponents that want to be executed (if any).protected boolean
switchtorescue
Should switch to rescue thread after next step?protected jadex.commons.future.Future<java.util.Map<java.lang.String,java.lang.Object>>
termfuture
The termination future (used in noplatform case).protected java.util.List<ITimer>
timers
The current timer.static java.lang.String
TYPE_STEP
Constant for step event.-
Fields inherited from class jadex.bridge.component.impl.AbstractComponentFeature
cinfo, component, guesser
-
Fields inherited from interface jadex.bridge.component.IExecutionFeature
STEP_PRIORITY_IMMEDIATE, STEP_PRIORITY_NORMAL, STEP_PRIORITY_UNSET
-
Fields inherited from interface jadex.bridge.component.impl.IInternalExecutionFeature
LOCAL
-
-
Constructor Summary
Constructors Constructor Description ExecutionComponentFeature(IInternalAccess component, ComponentCreationInfo cinfo)
Create the feature.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addStep(ExecutionComponentFeature.StepInfo step)
Add a new step.void
addSubcomponent(IInternalExecutionFeature sub)
Add a synchronous subcomponent that will run on its parent's thread.protected void
afterBlock()
Called after unblocking the component thread.protected void
beforeBlock()
Called before blocking the component thread.void
block(java.lang.Object monitor, long timeout, boolean realtime)
Block the current thread and allow execution on other threads.void
childTerminated(IComponentDescription desc, java.lang.Exception ex)
Called when a child was terminated.IComponentFeature
createInstance(IInternalAccess access, ComponentCreationInfo info)
Create an instance of the feature.<T> jadex.commons.future.IIntermediateResultListener<T>
createResultListener(jadex.commons.future.IIntermediateResultListener<T> listener)
Create a result listener that is executed on the component thread.<T> jadex.commons.future.IResultListener<T>
createResultListener(jadex.commons.future.IResultListener<T> listener)
Create a result listener that is executed on the component thread.protected <T> jadex.commons.future.Future<T>
createStepFuture(IComponentStep<T> step)
Create intermediate of direct future.protected void
doCleanup(java.lang.Error e)
Shared cleanup code for shutdown and kill.jadex.commons.future.IFuture<java.lang.Void>
doStep(java.lang.String stepinfo)
Do a step of a suspended component.boolean
execute()
Execute the executable.protected boolean
executeCycle()
Components with autonomous behavior may override this method to implement a recurring execution cycle.java.lang.Thread
getComponentThread()
Get the component thread.java.util.List<IMonitoringEvent>
getCurrentStateEvents()
Get the current state as events.java.util.List<ExecutionComponentFeature.StepInfo>
getCurrentSteps()
Get the current steps.IComponentDescription
getDescription()
Get the component description.jadex.commons.future.IFuture<IComponentDescription>
getDescription(IComponentIdentifier cid)
Get the component description.jadex.commons.future.IFuture<IComponentDescription>
getDescriptionAsync()
Get the component description.jadex.commons.future.IFuture<IComponentDescription[]>
getDescriptions()
Get the component description.int
getEndstateStart()
Get the step number when endstate began.IExternalAccess
getExternalAccess(IComponentIdentifier cid)
Get the external access for a component id.jadex.commons.future.IFuture<IExternalAccess>
getExternalAccessAsync(IComponentIdentifier cid)
Get the external access for a component id.java.util.Map<java.lang.String,java.lang.String>
getStepDetails(ExecutionComponentFeature.StepInfo step)
Get the details of a step.java.lang.Class<?>
getType()
Get the user interface type of the feature.boolean
hasUserBody()
Check if the feature potentially executed user code in body.boolean
isAtBreakpoint(java.lang.String[] breakpoints)
Test if the agent's execution is currently at one of the given breakpoints.boolean
isComponentThread()
Test if current thread is the component thread.boolean
isSemanticStepped()
Check if the execution kernel supports semantic steps.boolean
isStepped()
Check if component is in stepped execution.void
kill()
Kill is only invoked, when shutdown of some (e.g.jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>>
killComponent()
Kill the component.jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>>
killComponent(java.lang.Exception e)
Kill the component.jadex.commons.future.ISubscriptionIntermediateFuture<CMSStatusEvent>
listenToAll()
Add a component listener for all components of a platform.jadex.commons.future.ISubscriptionIntermediateFuture<CMSStatusEvent>
listenToComponent()
Add a component listener for a specific component.void
publishStepEvent(ExecutionComponentFeature.StepInfo step, java.lang.String type)
Publish a step event.protected ExecutionComponentFeature.StepInfo
removeStep()
Remove a new step.void
removeSubcomponent(IInternalExecutionFeature sub)
Remove a synchronous subcomponent.<T> jadex.commons.future.ISubscriptionIntermediateFuture<T>
repeatStep(long initialdelay, long delay, IComponentStep<T> step)
Repeats a ComponentStep periodically, until terminate() is called on result future or a failure occurs in a step.<T> jadex.commons.future.ISubscriptionIntermediateFuture<T>
repeatStep(long initialdelay, long delay, IComponentStep<T> step, boolean ignorefailures)
Repeats a ComponentStep periodically, until terminate() is called on result future.protected void
resetExecutionState(java.lang.ClassLoader cl)
Reset flags when exiting thread.jadex.commons.future.IFuture<java.lang.Void>
resumeComponent()
Resume the execution of an component.jadex.commons.future.IFuture<java.lang.Void>
scheduleDecoupledStep(IComponentStep<?> step)
Schedule a component step but don't wait for its execution.<T> jadex.commons.future.IFuture<T>
scheduleStep(int priority, boolean inherit, IComponentStep<T> step)
Execute a component step.<T> jadex.commons.future.IFuture<T>
scheduleStep(IComponentStep<T> step)
Execute a component step.jadex.commons.future.IFuture<java.lang.Void>
setComponentBreakpoints(java.lang.String[] breakpoints)
Set breakpoints for a component.void
setComponentThread(java.lang.Thread componentthread)
Set the component thread.protected java.lang.ClassLoader
setExecutionState()
Set flags when entering thread.void
setManual(boolean manual)
Set manual execution mode, e.g.jadex.commons.future.IFuture<java.lang.Void>
shutdown()
Shutdown the feature.jadex.commons.future.IFuture<java.lang.Void>
stepComponent(java.lang.String stepinfo)
Execute a step of a suspended component.jadex.commons.future.IFuture<java.lang.Void>
suspendComponent()
Suspend the execution of an component.protected void
switchToRescueThread()
Switch to rescue thread when execution service is gone.boolean
testIfBreakpoint(java.lang.String[] breakpoints)
Kernel specific test if the step is a breakpoint.java.lang.String
toString()
Get the string representation.void
unblock(java.lang.Object monitor, java.lang.Throwable exception)
Unblock the thread waiting for the given monitor and cease execution on the current thread.jadex.commons.future.IFuture<java.lang.Void>
waitForDelay(long delay)
Wait for some time.jadex.commons.future.IFuture<java.lang.Void>
waitForDelay(long delay, boolean realtime)
Wait for some time.<T> jadex.commons.future.IFuture<T>
waitForDelay(long delay, IComponentStep<T> step)
Wait for some time and execute a component step afterwards.<T> jadex.commons.future.IFuture<T>
waitForDelay(long delay, IComponentStep<T> step, boolean realtime)
Wait for some time and execute a component step afterwards.jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>>
waitForTermination()
Waits for the components to finish.jadex.commons.future.IFuture<java.lang.Void>
waitForTick()
Wait for the next tick.jadex.commons.future.IFuture<java.lang.Void>
waitForTick(IComponentStep<java.lang.Void> run)
Wait for the next tick.void
wakeup()
Trigger component execution.-
Methods inherited from class jadex.bridge.component.impl.AbstractComponentFeature
body, getClockService, getComponent, getExecutionService, getExternalFacade, getExternalFacadeType, getInternalAccess, getParameterGuesser, getValueFetcher, init
-
-
-
-
Field Detail
-
DEBUG
public static boolean DEBUG
Debug flag.
-
TYPE_STEP
public static final java.lang.String TYPE_STEP
Constant for step event.- See Also:
- Constant Field Values
-
steps
protected java.util.TreeSet<ExecutionComponentFeature.StepInfo> steps
The component steps.
-
stepcnt
protected int stepcnt
The stepcnt - used to keep insertion order of same priority elements in the queue.
-
bpstepid
protected int bpstepid
The id of the step at which the execution was stopped because of a breakpoint.
-
endstepcnt
protected int endstepcnt
The step at which the endstate begins.
-
timers
protected java.util.List<ITimer> timers
The current timer.
-
executing
protected volatile boolean executing
Flag for testing double execution.
-
stacktrace
protected volatile java.lang.Throwable stacktrace
Exception for debugging double execution.
-
componentthread
protected java.lang.Thread componentthread
The thread currently executing the component (null for none).
-
blocked
protected java.util.Map<java.lang.Object,jadex.commons.concurrent.Executor> blocked
The blocked threads by monitor.
-
stepinfo
protected java.lang.String stepinfo
The flag for a requested step (true when a step is allowed in stepwise execution).
-
stepfuture
protected jadex.commons.future.Future<java.lang.Void> stepfuture
The future to be informed, when the requested step is finished.
-
debugstep
protected ExecutionComponentFeature.StepInfo debugstep
-
parenta
protected IInternalExecutionFeature parenta
The parent adapter (cached for speed).
-
subcomponents
protected java.util.Set<IInternalExecutionFeature> subcomponents
The synchronous subcomponents that want to be executed (if any).
-
endagenda
protected jadex.commons.future.Future<java.lang.Void> endagenda
Future for signalling that end of agenda execution has been reached.
-
termfuture
protected jadex.commons.future.Future<java.util.Map<java.lang.String,java.lang.Object>> termfuture
The termination future (used in noplatform case).
-
debug
protected boolean debug
Heisenbug debug flag cached for speed.
-
stepadditions
protected java.util.Map<IComponentStep<?>,java.lang.Exception> stepadditions
-
manual
protected volatile boolean manual
Flag to indicate bootstrapping execution of main thread (only for platform, hack???).
-
switchtorescue
protected boolean switchtorescue
Should switch to rescue thread after next step?
-
isonrescue
protected boolean isonrescue
Running on rescue thread?
-
rescuethread
protected java.lang.Thread rescuethread
Is the current thread the rescue thread?
-
-
Constructor Detail
-
ExecutionComponentFeature
public ExecutionComponentFeature(IInternalAccess component, ComponentCreationInfo cinfo)
Create the feature.
-
-
Method Detail
-
shutdown
public jadex.commons.future.IFuture<java.lang.Void> shutdown()
Shutdown the feature.- Specified by:
shutdown
in interfaceIComponentFeature
- Overrides:
shutdown
in classAbstractComponentFeature
-
hasUserBody
public boolean hasUserBody()
Check if the feature potentially executed user code in body. Allows blocking operations in user bodies by using separate steps for each feature. Non-user-body-features are directly executed for speed. If unsure just return true. ;-)- Specified by:
hasUserBody
in interfaceIComponentFeature
- Overrides:
hasUserBody
in classAbstractComponentFeature
-
kill
public void kill()
Kill is only invoked, when shutdown of some (e.g. other) feature does not return due to timeout. The feature should do any kind of possible cleanup, but no asynchronous operations.- Specified by:
kill
in interfaceIComponentFeature
- Overrides:
kill
in classAbstractComponentFeature
-
doCleanup
protected void doCleanup(java.lang.Error e)
Shared cleanup code for shutdown and kill.
-
getType
public java.lang.Class<?> getType()
Get the user interface type of the feature.
-
createInstance
public IComponentFeature createInstance(IInternalAccess access, ComponentCreationInfo info)
Create an instance of the feature.
-
getDescription
public IComponentDescription getDescription()
Get the component description.- Specified by:
getDescription
in interfaceIExecutionFeature
- Returns:
- The component description.
-
scheduleDecoupledStep
public jadex.commons.future.IFuture<java.lang.Void> scheduleDecoupledStep(IComponentStep<?> step)
Schedule a component step but don't wait for its execution. Scheduling a decoupled step is useful to indicate that exceptions in the step are not handled by the caller, e.g., to have them printed to the console instead of discarded.- Specified by:
scheduleDecoupledStep
in interfaceIExternalExecutionFeature
- Parameters:
step
- The component step.- Returns:
- A future indicating that the step has been scheduled (but maybe not yet executed).
-
scheduleStep
public <T> jadex.commons.future.IFuture<T> scheduleStep(IComponentStep<T> step)
Execute a component step.- Specified by:
scheduleStep
in interfaceIExternalExecutionFeature
- Parameters:
step
- The component step.- Returns:
- the future result of the step execution.
-
scheduleStep
public <T> jadex.commons.future.IFuture<T> scheduleStep(int priority, boolean inherit, IComponentStep<T> step)
Execute a component step.- Specified by:
scheduleStep
in interfaceIExternalExecutionFeature
- Parameters:
step
- The component step.priority
- The step priority (0 is default).
-
repeatStep
public <T> jadex.commons.future.ISubscriptionIntermediateFuture<T> repeatStep(long initialdelay, long delay, IComponentStep<T> step)
Repeats a ComponentStep periodically, until terminate() is called on result future or a failure occurs in a step.- Specified by:
repeatStep
in interfaceIExternalExecutionFeature
- Parameters:
initialdelay
- delay before first execution in millisecondsdelay
- delay between scheduled executions of the step in millisecondsstep
- The component step- Returns:
- The intermediate results
-
repeatStep
public <T> jadex.commons.future.ISubscriptionIntermediateFuture<T> repeatStep(long initialdelay, long delay, IComponentStep<T> step, boolean ignorefailures)
Repeats a ComponentStep periodically, until terminate() is called on result future. Warning: In order to avoid memory leaks, the returned subscription future does NOT store values, requiring the addition of a listener within the same step the repeat step was schedule.- Specified by:
repeatStep
in interfaceIExternalExecutionFeature
- Parameters:
initialdelay
- delay before first execution in millisecondsdelay
- delay between scheduled executions of the step in millisecondsstep
- The component stepignorefailures
- Don't terminate repeating after a failed step.- Returns:
- The intermediate results
-
waitForDelay
public <T> jadex.commons.future.IFuture<T> waitForDelay(long delay, IComponentStep<T> step)
Wait for some time and execute a component step afterwards.- Specified by:
waitForDelay
in interfaceIExternalExecutionFeature
-
waitForDelay
public <T> jadex.commons.future.IFuture<T> waitForDelay(long delay, IComponentStep<T> step, boolean realtime)
Wait for some time and execute a component step afterwards.- Specified by:
waitForDelay
in interfaceIExternalExecutionFeature
-
waitForDelay
public jadex.commons.future.IFuture<java.lang.Void> waitForDelay(long delay)
Wait for some time.- Specified by:
waitForDelay
in interfaceIExternalExecutionFeature
-
waitForDelay
public jadex.commons.future.IFuture<java.lang.Void> waitForDelay(long delay, boolean realtime)
Wait for some time.- Specified by:
waitForDelay
in interfaceIExternalExecutionFeature
-
waitForTick
public jadex.commons.future.IFuture<java.lang.Void> waitForTick(IComponentStep<java.lang.Void> run)
Wait for the next tick.- Specified by:
waitForTick
in interfaceIExternalExecutionFeature
- Parameters:
time
- The time.
-
waitForTick
public jadex.commons.future.IFuture<java.lang.Void> waitForTick()
Wait for the next tick.- Specified by:
waitForTick
in interfaceIExternalExecutionFeature
- Parameters:
time
- The time.
-
waitForTermination
public jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>> waitForTermination()
Waits for the components to finish.- Specified by:
waitForTermination
in interfaceIExternalExecutionFeature
- Returns:
- Component results.
-
setManual
public void setManual(boolean manual)
Set manual execution mode, e.g. for bootstrapping at platform startup.- Specified by:
setManual
in interfaceIInternalExecutionFeature
- Parameters:
manual
- Ignore wake up calls, if true.
-
wakeup
public void wakeup()
Trigger component execution.- Specified by:
wakeup
in interfaceIInternalExecutionFeature
-
switchToRescueThread
protected void switchToRescueThread()
Switch to rescue thread when execution service is gone.
-
doStep
public jadex.commons.future.IFuture<java.lang.Void> doStep(java.lang.String stepinfo)
Do a step of a suspended component.- Specified by:
doStep
in interfaceIInternalExecutionFeature
-
isComponentThread
public boolean isComponentThread()
Test if current thread is the component thread.- Specified by:
isComponentThread
in interfaceIExecutionFeature
- Returns:
- True if the current thread is the component thread.
-
createResultListener
public <T> jadex.commons.future.IResultListener<T> createResultListener(jadex.commons.future.IResultListener<T> listener)
Create a result listener that is executed on the component thread.- Specified by:
createResultListener
in interfaceIExecutionFeature
-
createResultListener
public <T> jadex.commons.future.IIntermediateResultListener<T> createResultListener(jadex.commons.future.IIntermediateResultListener<T> listener)
Create a result listener that is executed on the component thread.- Specified by:
createResultListener
in interfaceIExecutionFeature
-
addSubcomponent
public void addSubcomponent(IInternalExecutionFeature sub)
Add a synchronous subcomponent that will run on its parent's thread.- Specified by:
addSubcomponent
in interfaceIInternalExecutionFeature
- Parameters:
sub
- The subcomponent.
-
removeSubcomponent
public void removeSubcomponent(IInternalExecutionFeature sub)
Remove a synchronous subcomponent.- Specified by:
removeSubcomponent
in interfaceIInternalExecutionFeature
- Parameters:
sub
- The subcomponent.
-
block
public void block(java.lang.Object monitor, long timeout, boolean realtime)
Block the current thread and allow execution on other threads.- Specified by:
block
in interfaceIInternalExecutionFeature
- Parameters:
monitor
- The monitor to wait for.realtime
- Flag if timeout is realtime (in contrast to simulation time).
-
unblock
public void unblock(java.lang.Object monitor, java.lang.Throwable exception)
Unblock the thread waiting for the given monitor and cease execution on the current thread.- Specified by:
unblock
in interfaceIInternalExecutionFeature
- Parameters:
monitor
- The monitor to notify.
-
beforeBlock
protected void beforeBlock()
Called before blocking the component thread.
-
afterBlock
protected void afterBlock()
Called after unblocking the component thread.
-
execute
public boolean execute()
Execute the executable.- Specified by:
execute
in interfacejadex.commons.concurrent.IExecutable
- Specified by:
execute
in interfaceIInternalExecutionFeature
- Returns:
- True, if the object wants to be executed again.
-
getComponentThread
public java.lang.Thread getComponentThread()
Get the component thread.- Returns:
- The component thread.
-
setComponentThread
public void setComponentThread(java.lang.Thread componentthread)
Set the component thread.- Parameters:
componentthread
- The component thread.
-
setExecutionState
protected java.lang.ClassLoader setExecutionState()
Set flags when entering thread.- Returns:
- The previous context class loader.
-
resetExecutionState
protected void resetExecutionState(java.lang.ClassLoader cl)
Reset flags when exiting thread.- Parameters:
cl
- The previous context class loader.
-
executeCycle
protected boolean executeCycle()
Components with autonomous behavior may override this method to implement a recurring execution cycle.- Returns:
- true, if the execution should continue, false, if the component may become idle.
-
createStepFuture
protected <T> jadex.commons.future.Future<T> createStepFuture(IComponentStep<T> step)
Create intermediate of direct future.
-
addStep
protected void addStep(ExecutionComponentFeature.StepInfo step)
Add a new step.
-
removeStep
protected ExecutionComponentFeature.StepInfo removeStep()
Remove a new step.
-
publishStepEvent
public void publishStepEvent(ExecutionComponentFeature.StepInfo step, java.lang.String type)
Publish a step event.
-
getStepDetails
public java.util.Map<java.lang.String,java.lang.String> getStepDetails(ExecutionComponentFeature.StepInfo step)
Get the details of a step.
-
getCurrentSteps
public java.util.List<ExecutionComponentFeature.StepInfo> getCurrentSteps()
Get the current steps.- Returns:
- The current steps.
-
getCurrentStateEvents
public java.util.List<IMonitoringEvent> getCurrentStateEvents()
Get the current state as events.
-
isAtBreakpoint
public boolean isAtBreakpoint(java.lang.String[] breakpoints)
Test if the agent's execution is currently at one of the given breakpoints. If yes, the agent will be suspended by the platform. Available breakpoints can be specified in the micro agent meta info.- Parameters:
breakpoints
- An array of breakpoints.- Returns:
- True, when some breakpoint is triggered.
-
testIfBreakpoint
public boolean testIfBreakpoint(java.lang.String[] breakpoints)
Kernel specific test if the step is a breakpoint.
-
listenToComponent
public jadex.commons.future.ISubscriptionIntermediateFuture<CMSStatusEvent> listenToComponent()
Add a component listener for a specific component. The listener is registered for component changes.- Specified by:
listenToComponent
in interfaceIExternalExecutionFeature
- Parameters:
cid
- The component to be listened.
-
listenToAll
public jadex.commons.future.ISubscriptionIntermediateFuture<CMSStatusEvent> listenToAll()
Add a component listener for all components of a platform. The listener is registered for component changes.- Specified by:
listenToAll
in interfaceIExternalExecutionFeature
-
stepComponent
public jadex.commons.future.IFuture<java.lang.Void> stepComponent(java.lang.String stepinfo)
Execute a step of a suspended component.- Specified by:
stepComponent
in interfaceIExternalExecutionFeature
- Parameters:
componentid
- The component identifier.
-
setComponentBreakpoints
public jadex.commons.future.IFuture<java.lang.Void> setComponentBreakpoints(java.lang.String[] breakpoints)
Set breakpoints for a component. Replaces existing breakpoints. To add/remove breakpoints, use current breakpoints from component description as a base.- Specified by:
setComponentBreakpoints
in interfaceIExternalExecutionFeature
- Parameters:
componentid
- The component identifier.breakpoints
- The new breakpoints (if any).
-
suspendComponent
public jadex.commons.future.IFuture<java.lang.Void> suspendComponent()
Suspend the execution of an component.- Specified by:
suspendComponent
in interfaceIExternalExecutionFeature
- Parameters:
componentid
- The component identifier.
-
resumeComponent
public jadex.commons.future.IFuture<java.lang.Void> resumeComponent()
Resume the execution of an component.- Specified by:
resumeComponent
in interfaceIExternalExecutionFeature
- Parameters:
componentid
- The component identifier.
-
isStepped
public boolean isStepped()
Check if component is in stepped execution.- Specified by:
isStepped
in interfaceIExecutionFeature
- Returns:
- True, if is in stepped execution.
-
isSemanticStepped
public boolean isSemanticStepped()
Check if the execution kernel supports semantic steps.- Returns:
- True, if semantic steps are supported and the kernel uses events to setSemanticEffect on current steps.
-
killComponent
public jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>> killComponent()
Kill the component.- Specified by:
killComponent
in interfaceIExternalExecutionFeature
-
killComponent
public jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>> killComponent(java.lang.Exception e)
Kill the component.- Specified by:
killComponent
in interfaceIExternalExecutionFeature
- Parameters:
e
- The failure reason, if any.
-
getExternalAccess
public IExternalAccess getExternalAccess(IComponentIdentifier cid)
Get the external access for a component id.- Specified by:
getExternalAccess
in interfaceIExternalExecutionFeature
- Parameters:
cid
- The component id.- Returns:
- The external access.
-
getExternalAccessAsync
public jadex.commons.future.IFuture<IExternalAccess> getExternalAccessAsync(IComponentIdentifier cid)
Get the external access for a component id.- Specified by:
getExternalAccessAsync
in interfaceIExternalExecutionFeature
- Parameters:
cid
- The component id.- Returns:
- The external access.
-
getDescriptionAsync
public jadex.commons.future.IFuture<IComponentDescription> getDescriptionAsync()
Get the component description.- Specified by:
getDescriptionAsync
in interfaceIExternalExecutionFeature
- Returns:
- The component description.
-
getDescription
public jadex.commons.future.IFuture<IComponentDescription> getDescription(IComponentIdentifier cid)
Get the component description.- Specified by:
getDescription
in interfaceIExternalExecutionFeature
- Returns:
- The component description.
-
getDescriptions
public jadex.commons.future.IFuture<IComponentDescription[]> getDescriptions()
Get the component description.- Specified by:
getDescriptions
in interfaceIExternalExecutionFeature
- Returns:
- The component description.
-
getEndstateStart
public int getEndstateStart()
Get the step number when endstate began.- Specified by:
getEndstateStart
in interfaceIInternalExecutionFeature
- Returns:
- The step cnt.
-
childTerminated
public void childTerminated(IComponentDescription desc, java.lang.Exception ex)
Called when a child was terminated.- Specified by:
childTerminated
in interfaceIInternalExecutionFeature
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
-
-