public class ExecutionEnvironment extends Object implements TaskStateListener
ExecutionEnvironment for Tasks. The environment starts
and monitors optimization tasks. Tasks are not submitted directly, instead a
collection of Modules is submitted and a Task is created. The
ExecutionEnvironment is processing the Tasks sequentially.Task| Constructor and Description |
|---|
ExecutionEnvironment(com.google.inject.Provider<Task> taskProvider)
Constructs a
ExecutionEnvironment. |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(TaskListener listener)
Adds a
TaskListener. |
void |
execute(Collection<com.google.inject.Module> modules)
Executes the specified modules: A
Task is created and submitted. |
List<Task> |
getTasks()
Returns the list of all
Tasks. |
void |
removeListener(TaskListener listener)
Removes a
TaskListener. |
void |
stateChanged(Task task)
Invoked if a
Task changes its state. |
@Inject public ExecutionEnvironment(com.google.inject.Provider<Task> taskProvider)
ExecutionEnvironment.taskProvider - the task providerpublic void execute(Collection<com.google.inject.Module> modules)
Task is created and submitted.modules - the collection of modules for a Taskpublic void addListener(TaskListener listener)
TaskListener.listener - the listener to be addedpublic void removeListener(TaskListener listener)
TaskListener.listener - the listener to be removedaddListener(org.opt4j.config.TaskListener)public void stateChanged(Task task)
TaskStateListenerTask changes its state.stateChanged in interface TaskStateListenertask - the task that changed its state