public class FutureFinishChecker
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
protected IResultListener | 
delegate
The delegate to be notified. 
 | 
protected boolean | 
finished
Flag, if set to finished (no more tasks allowed and notfication when all tasks finished). 
 | 
protected boolean | 
notified
Flag to remember that delegate was notified. 
 | 
protected java.util.List | 
tasks
The list of future tasks to observe. 
 | 
| Constructor and Description | 
|---|
FutureFinishChecker(IResultListener delegate)
Create a new checker. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addTask(Future future)
Add a task. 
 | 
void | 
check()
Check if completed. 
 | 
void | 
finished()
Set to finished. 
 | 
protected IResultListener delegate
protected java.util.List tasks
protected boolean finished
protected boolean notified
public FutureFinishChecker(IResultListener delegate)
public void addTask(Future future)
public void finished()
public void check()