org.jactr.tools.async.iterative.listener
Class NetworkedIterativeRunListener
java.lang.Object
org.jactr.tools.async.common.MINAEndpoint
org.jactr.tools.async.iterative.listener.NetworkedIterativeRunListener
- All Implemented Interfaces:
- org.jactr.core.utils.parameter.IParameterized, IIterativeRunListener
public class NetworkedIterativeRunListener
- extends MINAEndpoint
- implements IIterativeRunListener, org.jactr.core.utils.parameter.IParameterized
- Author:
- developer
|
Method Summary |
void |
exceptionThrown(int index,
org.jactr.core.model.IModel model,
java.lang.Throwable thrown)
called if something goes horribly wrong. |
BaseIOHandler |
getIOHandler()
return the io handler that handles all the communications |
java.util.Collection<java.lang.String> |
getPossibleParameters()
|
void |
postRun(int currentRunIndex,
int totalRuns,
java.util.Collection<org.jactr.core.model.IModel> models)
|
void |
preBuild(int currentRunIndex,
int totalRuns,
java.util.Collection<org.antlr.runtime.tree.CommonTree> modelDescriptors)
called before each build of the models in the IterativeMain. |
void |
preLoad(int currentRunIndex,
int totalRuns)
|
void |
preRun(int currentRunIndex,
int totalRuns,
java.util.Collection<org.jactr.core.model.IModel> models)
called before the run starts |
void |
setParameter(java.lang.String key,
java.lang.String value)
|
void |
start(int totalRuns)
|
void |
stop()
|
| Methods inherited from class org.jactr.tools.async.common.MINAEndpoint |
getActualAddress, getActualCredentials, getExecutorService, getParameter, getSetableParameters, setAddressInfo, setCredentialInformation, setCredentialsClass, setExecutorService, setProtocol, setService, setTransportProvider |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jactr.core.utils.parameter.IParameterized |
getParameter, getSetableParameters |
DEADLOCK_TIMEOUT_PARAM
public static final java.lang.String DEADLOCK_TIMEOUT_PARAM
- See Also:
- Constant Field Values
NetworkedIterativeRunListener
public NetworkedIterativeRunListener()
exceptionThrown
public void exceptionThrown(int index,
org.jactr.core.model.IModel model,
java.lang.Throwable thrown)
- Description copied from interface:
IIterativeRunListener
- called if something goes horribly wrong. This can be invoked at any of
three locations:
During a model execution (in which case index>=1, model!=null)
If something goes wrong after the run during cleanup (index>=1,
model==null)
or at the end if something goes wrong (index==0, model==null)
- Specified by:
exceptionThrown in interface IIterativeRunListener
- See Also:
IIterativeRunListener.exceptionThrown(int,
org.jactr.core.model.IModel, java.lang.Throwable)
postRun
public void postRun(int currentRunIndex,
int totalRuns,
java.util.Collection<org.jactr.core.model.IModel> models)
- Specified by:
postRun in interface IIterativeRunListener
- See Also:
IIterativeRunListener.postRun(int, int,
java.util.Collection)
preBuild
public void preBuild(int currentRunIndex,
int totalRuns,
java.util.Collection<org.antlr.runtime.tree.CommonTree> modelDescriptors)
- Description copied from interface:
IIterativeRunListener
- called before each build of the models in the IterativeMain. This gives the
listener a chance to tweak the models before they are constructed
- Specified by:
preBuild in interface IIterativeRunListener
modelDescriptors - all the descriptors of the models to be created.- See Also:
IIterativeRunListener.preBuild(int, int,
java.util.Collection)
preRun
public void preRun(int currentRunIndex,
int totalRuns,
java.util.Collection<org.jactr.core.model.IModel> models)
- Description copied from interface:
IIterativeRunListener
- called before the run starts
- Specified by:
preRun in interface IIterativeRunListener
- See Also:
IIterativeRunListener.preRun(int, int,
java.util.Collection)
getIOHandler
public BaseIOHandler getIOHandler()
- Description copied from class:
MINAEndpoint
- return the io handler that handles all the communications
- Specified by:
getIOHandler in class MINAEndpoint
- Returns:
- See Also:
MINAEndpoint.getIOHandler()
start
public void start(int totalRuns)
- Specified by:
start in interface IIterativeRunListener
- See Also:
IIterativeRunListener.start(int)
stop
public void stop()
- Specified by:
stop in interface IIterativeRunListener
- See Also:
IIterativeRunListener.stop()
getPossibleParameters
public java.util.Collection<java.lang.String> getPossibleParameters()
- Specified by:
getPossibleParameters in interface org.jactr.core.utils.parameter.IParameterized- Overrides:
getPossibleParameters in class MINAEndpoint
- See Also:
IParameterized.getPossibleParameters()
setParameter
public void setParameter(java.lang.String key,
java.lang.String value)
- Specified by:
setParameter in interface org.jactr.core.utils.parameter.IParameterized- Overrides:
setParameter in class MINAEndpoint
- See Also:
IParameterized.setParameter(java.lang.String,
java.lang.String)
preLoad
public void preLoad(int currentRunIndex,
int totalRuns)
- Specified by:
preLoad in interface IIterativeRunListener