Package jadex.bridge.component
Interface IExternalExecutionFeature
-
- All Superinterfaces:
IExternalComponentFeature
- All Known Subinterfaces:
IBDIAgent
,IExecutionFeature
,IExternalAccess
,IInternalAccess
- All Known Implementing Classes:
ComponentPlanBDI
,HelloWorldBDI
,HelloWorldPlan2
,IndexChangeBDI
,InterfaceInjectionBDI
,PlanMethodInjectionBDI
,PlanReasonInjectionBDI
,SayHelloBDI
public interface IExternalExecutionFeature extends IExternalComponentFeature
External perspective of the execution feature.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IFuture<IComponentDescription>
getDescription(IComponentIdentifier cid)
Get the component description.IFuture<IComponentDescription>
getDescriptionAsync()
Get the component description.IFuture<IComponentDescription[]>
getDescriptions()
Get the component description.IExternalAccess
getExternalAccess(IComponentIdentifier cid)
Get the external access for a component id.IFuture<IExternalAccess>
getExternalAccessAsync(IComponentIdentifier cid)
Get the external access for a component id.IFuture<java.util.Map<java.lang.String,java.lang.Object>>
killComponent()
Kill the component.IFuture<java.util.Map<java.lang.String,java.lang.Object>>
killComponent(java.lang.Exception e)
Kill the component.ISubscriptionIntermediateFuture<CMSStatusEvent>
listenToAll()
Add a component listener for all components of a platform.ISubscriptionIntermediateFuture<CMSStatusEvent>
listenToComponent()
Add a component listener for a specific component.<T> 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> ISubscriptionIntermediateFuture<T>
repeatStep(long initialDelay, long delay, IComponentStep<T> step, boolean ignorefailures)
Repeats a ComponentStep periodically, until terminate() is called on result future.IFuture<java.lang.Void>
resumeComponent()
Resume the execution of an component.<T> IFuture<T>
scheduleStep(int priority, IComponentStep<T> step)
Execute a component step.<T> IFuture<T>
scheduleStep(IComponentStep<T> step)
Execute a component step.IFuture<java.lang.Void>
setComponentBreakpoints(java.lang.String[] breakpoints)
Set breakpoints for a component.IFuture<java.lang.Void>
stepComponent(java.lang.String stepinfo)
Execute a step of a suspended component.IFuture<java.lang.Void>
suspendComponent()
Suspend the execution of an component.IFuture<java.lang.Void>
waitForDelay(long delay)
Wait for some time.IFuture<java.lang.Void>
waitForDelay(long delay, boolean realtime)
Wait for some time.<T> IFuture<T>
waitForDelay(long delay, IComponentStep<T> step)
Wait for some time and execute a component step afterwards.<T> IFuture<T>
waitForDelay(long delay, IComponentStep<T> step, boolean realtime)
Wait for some time and execute a component step afterwards.IFuture<java.util.Map<java.lang.String,java.lang.Object>>
waitForTermination()
Waits for the components to finish.IFuture<java.lang.Void>
waitForTick()
Wait for the next tick.IFuture<java.lang.Void>
waitForTick(IComponentStep<java.lang.Void> run)
Wait for the next tick.
-
-
-
Method Detail
-
scheduleStep
<T> IFuture<T> scheduleStep(IComponentStep<T> step)
Execute a component step.- Parameters:
step
- The component step.
-
scheduleStep
<T> IFuture<T> scheduleStep(int priority, 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> IFuture<T> waitForDelay(long delay, IComponentStep<T> step, boolean realtime)
Wait for some time and execute a component step afterwards.
-
waitForDelay
<T> IFuture<T> waitForDelay(long delay, IComponentStep<T> step)
Wait for some time and execute a component step afterwards.
-
waitForDelay
IFuture<java.lang.Void> waitForDelay(long delay, boolean realtime)
Wait for some time.
-
waitForDelay
IFuture<java.lang.Void> waitForDelay(long delay)
Wait for some time.
-
waitForTick
IFuture<java.lang.Void> waitForTick(IComponentStep<java.lang.Void> run)
Wait for the next tick.- Parameters:
time
- The time.
-
waitForTick
IFuture<java.lang.Void> waitForTick()
Wait for the next tick.- Parameters:
time
- The time.
-
waitForTermination
IFuture<java.util.Map<java.lang.String,java.lang.Object>> waitForTermination()
Waits for the components to finish.- Returns:
- Component results.
-
repeatStep
<T> 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> 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
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
ISubscriptionIntermediateFuture<CMSStatusEvent> listenToAll()
Add a component listener for all components of a platform. The listener is registered for component changes.
-
stepComponent
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
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
IFuture<java.lang.Void> suspendComponent()
Suspend the execution of an component.- Parameters:
componentid
- The component identifier.
-
resumeComponent
IFuture<java.lang.Void> resumeComponent()
Resume the execution of an component.- Parameters:
componentid
- The component identifier.
-
killComponent
IFuture<java.util.Map<java.lang.String,java.lang.Object>> killComponent()
Kill the component.
-
killComponent
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
IFuture<IExternalAccess> getExternalAccessAsync(IComponentIdentifier cid)
Get the external access for a component id.- Parameters:
cid
- The component id.- Returns:
- The external access.
-
getDescriptionAsync
IFuture<IComponentDescription> getDescriptionAsync()
Get the component description.- Returns:
- The component description.
-
getDescription
IFuture<IComponentDescription> getDescription(IComponentIdentifier cid)
Get the component description.- Returns:
- The component description.
-
getDescriptions
IFuture<IComponentDescription[]> getDescriptions()
Get the component description.- Returns:
- The component description.
-
-