Package jadex.micro.taskdistributor
Interface IIntermediateTaskDistributor<R,T>
- All Known Implementing Classes:
IntermediateTaskDistributorAgent
public interface IIntermediateTaskDistributor<R,T>
-
Method Summary
Modifier and TypeMethodDescriptionjadex.future.IFuture
<Void> addTaskResult
(String id, R result) Set the result of a task.jadex.future.IIntermediateFuture
<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> Set a task finished.
-
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).
-
addTaskResult
Set the result of a task.- Parameters:
id
- The task id.result
- The result.
-
setTaskFinished
Set a task finished.- Parameters:
id
- The task id.result
- The result.
-
setTaskException
Set the exception of a task.- Parameters:
id
- The task id.ex
- The exception.
-