Interface IExternalExecutionFeature

    • Method Detail

      • scheduleStep

        <T> IFuture<T> scheduleStep​(IComponentStep<T> step)
        Execute a component step.
        Parameters:
        step - The component step.
        Returns:
        the future result of the step execution.
      • scheduleDecoupledStep

        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> 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> 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 milliseconds
        delay - delay between scheduled executions of the step in milliseconds
        step - 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 milliseconds
        delay - delay between scheduled executions of the step in milliseconds
        step - The component step
        ignorefailures - 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.
      • 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.