public interface ExecutionService
Callable, Command or Tool.
Allows both synchronous and asynchronous task execution| Modifier and Type | Method and Description |
|---|---|
<T> Execution<T> |
execute(Callable<T> task)
Executes a task asynchronously.
|
<T> Execution<T> |
schedule(Callable<T> task,
long delay,
TimeUnit unit)
Schedules a task to be executed periodically until
breakCondition is evaluate to true or timeout is
reached. |
<T> Execution<T> execute(Callable<T> task) throws ExecutionException
task - Task to be executedExecutionException<T> Execution<T> schedule(Callable<T> task, long delay, TimeUnit unit) throws TimeoutExecutionException, ExecutionException
breakCondition is evaluate to true or timeout is
reached.task - Task to be executedbreakCondition - break conditionstep - Time to wait until next execution should be performedtimeout - Total timeoutunit - Timeout unitTimeoutExecutionExceptionExecutionExceptionCopyright © 2014 JBoss by Red Hat. All rights reserved.