Package jadex.bridge.component
Interface IExternalExecutionFeature
-
- All Superinterfaces:
IExternalComponentFeature
- All Known Subinterfaces:
IExecutionFeature
,IExternalAccess
,IInternalAccess
- All Known Implementing Classes:
ExecutionComponentFeature
public interface IExternalExecutionFeature extends IExternalComponentFeature
External perspective of the execution feature.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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 descriptions.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.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.<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.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.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.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.
-
-
-
Method Detail
-
scheduleStep
<T> jadex.commons.future.IFuture<T> scheduleStep(IComponentStep<T> step)
Execute a component step.- Parameters:
step
- The component step.- Returns:
- the future result of the step execution.
-
scheduleDecoupledStep
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.- Parameters:
step
- The component step.- Returns:
- A future indicating that the step has been scheduled (but maybe not yet executed).
-
scheduleStep
<T> jadex.commons.future.IFuture<T> scheduleStep(int priority, boolean inherit, IComponentStep<T> step)
Execute a component step.- Parameters:
step
- The component step.priority
- The step priority. The priority x>STEP_PRIORITY_IMMEDIATE being immediate steps, i.e. all steps with prio x>=STEP_PRIORITY_IMMEDIATE are always executed (even when suspended). Default steps get prio STEP_PRIORITY_NOMRAL (not immediate).
-
waitForDelay
<T> jadex.commons.future.IFuture<T> waitForDelay(long delay, IComponentStep<T> step, boolean realtime)
Wait for some time and execute a component step afterwards.
-
waitForDelay
<T> jadex.commons.future.IFuture<T> waitForDelay(long delay, IComponentStep<T> step)
Wait for some time and execute a component step afterwards.
-
waitForDelay
jadex.commons.future.IFuture<java.lang.Void> waitForDelay(long delay, boolean realtime)
Wait for some time.
-
waitForDelay
jadex.commons.future.IFuture<java.lang.Void> waitForDelay(long delay)
Wait for some time.
-
waitForTick
jadex.commons.future.IFuture<java.lang.Void> waitForTick(IComponentStep<java.lang.Void> run)
Wait for the next tick.- Parameters:
time
- The time.
-
waitForTick
jadex.commons.future.IFuture<java.lang.Void> waitForTick()
Wait for the next tick.- Parameters:
time
- The time.
-
waitForTermination
jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>> waitForTermination()
Waits for the components to finish.- Returns:
- Component results.
-
repeatStep
<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. 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.- 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
<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.- 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
-
listenToComponent
jadex.commons.future.ISubscriptionIntermediateFuture<CMSStatusEvent> listenToComponent()
Add a component listener for a specific component. The listener is registered for component changes.- Parameters:
cid
- The component to be listened.
-
listenToAll
jadex.commons.future.ISubscriptionIntermediateFuture<CMSStatusEvent> listenToAll()
Add a component listener for all components of a platform. The listener is registered for component changes.
-
stepComponent
jadex.commons.future.IFuture<java.lang.Void> stepComponent(java.lang.String stepinfo)
Execute a step of a suspended component.- Parameters:
componentid
- The component identifier.listener
- Called when the step is finished (result will be the component description).
-
setComponentBreakpoints
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.- Parameters:
componentid
- The component identifier.breakpoints
- The new breakpoints (if any).
-
suspendComponent
jadex.commons.future.IFuture<java.lang.Void> suspendComponent()
Suspend the execution of an component.- Parameters:
componentid
- The component identifier.
-
resumeComponent
jadex.commons.future.IFuture<java.lang.Void> resumeComponent()
Resume the execution of an component.- Parameters:
componentid
- The component identifier.
-
killComponent
jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>> killComponent()
Kill the component.
-
killComponent
jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>> killComponent(java.lang.Exception e)
Kill the component.- Parameters:
e
- The failure reason, if any.
-
getExternalAccess
IExternalAccess getExternalAccess(IComponentIdentifier cid)
Get the external access for a component id.- Parameters:
cid
- The component id.- Returns:
- The external access.
-
getExternalAccessAsync
jadex.commons.future.IFuture<IExternalAccess> getExternalAccessAsync(IComponentIdentifier cid)
Get the external access for a component id.- Parameters:
cid
- The component id.- Returns:
- The external access.
-
getDescriptionAsync
jadex.commons.future.IFuture<IComponentDescription> getDescriptionAsync()
Get the component description.- Returns:
- The component description.
-
getDescription
jadex.commons.future.IFuture<IComponentDescription> getDescription(IComponentIdentifier cid)
Get the component description.- Returns:
- The component description.
-
getDescriptions
jadex.commons.future.IFuture<IComponentDescription[]> getDescriptions()
Get the component descriptions.- Returns:
- The component descriptions.
-
-