Package jadex.micro.taskdistributor
Interface ITaskDistributor<R,T>
- All Known Implementing Classes:
TaskDistributorAgent
public interface ITaskDistributor<R,T>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionjadex.future.IFuture
<R> Publish a new task.jadex.future.IFuture
<ITaskDistributor.Task<T>> Request a task.jadex.future.IFuture
<Void> setTaskException
(String id, Exception ex) Set the exception of a task.jadex.future.IFuture
<Void> setTaskResult
(String id, R result) Set the result of a task.
-
Method Details
-
publish
Publish a new task.- Parameters:
task
- The task to publish.
-
requestNextTask
jadex.future.IFuture<ITaskDistributor.Task<T>> requestNextTask()Request a task.- Returns:
- The next task (waits for a task).
-
setTaskResult
Set the result of a task.- Parameters:
id
- The task id.result
- The result.
-
setTaskException
Set the exception of a task.- Parameters:
id
- The task id.ex
- The exception.
-