Package jadex.core
Interface IExternalAccess
public interface IExternalAccess
Interface for component access from non-component thread, e.g. UI thread.
-
Method Summary
Modifier and TypeMethodDescriptiongetId()Get the id.default booleanCheck if this component allows the execution of steps.default voidSchedule a step that provides a result.default <T> jadex.future.IFuture<T>scheduleStep(IThrowingFunction<IComponent, T> step) Schedule a step that provides a result.default voidscheduleStep(Runnable step) Schedule a step to be run on the component.default <T> jadex.future.IFuture<T>scheduleStep(Callable<T> step) Schedule a step that provides a result.default jadex.future.IFuture<Void>Terminate the component.default jadex.future.IFuture<Boolean>Wait for termination.
-
Method Details
-
getId
ComponentIdentifier 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
Terminate the component. -
waitForTermination
Wait for termination.- Returns:
- True on termination; false on component not found.
-
scheduleStep
Schedule a step to be run on the component.- Parameters:
step- A step that is executed via theRunnable.run()method.
-
scheduleStep
Schedule a step that provides a result.- Parameters:
step- A step that is executed via theSupplier.get()method.- Returns:
- A future that provides access to the step result, once it is available.
-
scheduleStep
Schedule a step that provides a result.- Parameters:
step- A step that is executed via theIThrowingConsumer#accept()method.
-
scheduleStep
Schedule a step that provides a result.- Parameters:
step- A step that is executed via theIThrowingFunction#apply()method.- Returns:
- A future that provides access to the step result, once it is available.
-