Package jadex.core

Interface IExternalAccess


public interface IExternalAccess
Interface for component access from non-component thread, e.g. UI thread.
  • Method Details

    • getId

      Get the id.
      Returns:
      The id.
    • isExecutable

      default boolean isExecutable()
      Check if this component allows the execution of steps. Otherwise scheduleStep(...) methods with throw UnsupportedOperationException
    • terminate

      default jadex.future.IFuture<Void> terminate()
      Terminate the component.
    • waitForTermination

      default jadex.future.IFuture<Boolean> waitForTermination()
      Wait for termination.
      Returns:
      True on termination; false on component not found.
    • scheduleStep

      default void scheduleStep(Runnable step)
      Schedule a step to be run on the component.
      Parameters:
      step - A step that is executed via the Runnable.run() method.
    • scheduleStep

      default <T> jadex.future.IFuture<T> scheduleStep(Callable<T> step)
      Schedule a step that provides a result.
      Parameters:
      step - A step that is executed via the Supplier.get() method.
      Returns:
      A future that provides access to the step result, once it is available.
    • scheduleStep

      default void scheduleStep(IThrowingConsumer<IComponent> step)
      Schedule a step that provides a result.
      Parameters:
      step - A step that is executed via the
      invalid reference
      IThrowingConsumer#accept()
      method.
    • scheduleStep

      default <T> jadex.future.IFuture<T> scheduleStep(IThrowingFunction<IComponent,T> step)
      Schedule a step that provides a result.
      Parameters:
      step - A step that is executed via the
      invalid reference
      IThrowingFunction#apply()
      method.
      Returns:
      A future that provides access to the step result, once it is available.