Package jadex.future
Class FutureFinishChecker
java.lang.Object
jadex.future.FutureFinishChecker
Allows monitoring a number of tasks (futures) and get a
notification when set to finished (no more new tasks)
and all tasks have been processed (futures notified).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IResultListener
The delegate to be notified.protected boolean
Flag, if set to finished (no more tasks allowed and notfication when all tasks finished).protected boolean
Flag to remember that delegate was notified.protected List
The list of future tasks to observe. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
delegate
The delegate to be notified. -
tasks
The list of future tasks to observe. -
finished
protected boolean finishedFlag, if set to finished (no more tasks allowed and notfication when all tasks finished). -
notified
protected boolean notifiedFlag to remember that delegate was notified.
-
-
Constructor Details
-
FutureFinishChecker
Create a new checker.
-
-
Method Details
-
addTask
Add a task. -
finished
public void finished()Set to finished. -
check
public void check()Check if completed.
-