|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opt4j.core.config.Task
org.opt4j.core.start.Opt4JTask
public class Opt4JTask
The Opt4JTask executes one optimization process.
Task| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opt4j.core.config.Task |
|---|
Task.State |
| Field Summary | |
|---|---|
protected boolean |
closeOnStop
|
protected com.google.inject.Injector |
injector
|
protected boolean |
isClosed
|
protected Optimizer |
optimizer
|
protected com.google.inject.Injector |
parentInjector
|
| Fields inherited from class org.opt4j.core.config.Task |
|---|
e, isInit, listeners, modules, state |
| Constructor Summary | |
|---|---|
Opt4JTask()
Constructs a Opt4JTask. |
|
Opt4JTask(boolean closeOnStop)
Constructs a Opt4JTask. |
|
| Method Summary | ||
|---|---|---|
void |
close()
Close the task. |
|
void |
execute()
Executes the Task. |
|
protected com.google.inject.Injector |
getInjector()
Returns the Injector of the task. |
|
|
getInstance(java.lang.Class<O> type)
Returns the instance of the given class. |
|
int |
getIteration()
Returns the current iteration. |
|
protected Optimizer |
getOptimizer()
Returns the Optimizer of the task. |
|
void |
init(com.google.inject.Injector injector)
Initialize with a parent Injector. |
|
void |
iterationComplete(int iteration)
Invoked if the Optimizer completes an iteration. |
|
void |
open()
Initialize a task manually before executing it. |
|
void |
stateChanged(Control.State state)
Invoked if the state of the Control changes. |
|
| Methods inherited from class org.opt4j.core.config.Task |
|---|
addStateListener, call, getException, getModules, getState, init, init, removeStateListener, setState, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Optimizer optimizer
protected com.google.inject.Injector injector
protected com.google.inject.Injector parentInjector
protected final boolean closeOnStop
protected boolean isClosed
| Constructor Detail |
|---|
@Inject public Opt4JTask()
Opt4JTask.
public Opt4JTask(boolean closeOnStop)
Opt4JTask.
closeOnStop - close automatically after optimization| Method Detail |
|---|
public void execute()
throws java.lang.Exception
TaskTask.
execute in class Taskjava.lang.Exceptionpublic void init(com.google.inject.Injector injector)
Injector.
injector - the parent injectorpublic void close()
public void open()
public int getIteration()
public <O> O getInstance(java.lang.Class<O> type)
O - the type of classtype - the class
protected com.google.inject.Injector getInjector()
Injector of the task.
protected Optimizer getOptimizer()
Optimizer of the task.
public void stateChanged(Control.State state)
ControlListenerControl changes.
stateChanged in interface ControlListenerstate - the current state of the optimization processpublic void iterationComplete(int iteration)
OptimizerIterationListenerOptimizer completes an iteration.
iterationComplete in interface OptimizerIterationListeneriteration - the completed iteration
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||