public abstract class ModelStarter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected TConnection |
connection
Connection to the IMB hub.
|
| Constructor and Description |
|---|
ModelStarter(String[] args,
String providedModelName,
int providedModelId)
Create a new ModelStarter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doQuitApplication()
Terminate the application.
|
void |
doStartModel(ModelParameters parameters)
Start a model.
|
void |
doStopModel()
Stop the model and go to idle state.
|
String |
getRemoteHost()
Retrieve the remote host name.
|
int |
getRemotePort()
Retrieve the remote port number.
|
abstract void |
parameterRequest(ModelParameters parameters)
The model must fill in its parameters.
|
abstract void |
quitApplication()
Kill the model; called before this application exits.
|
void |
signalModelProgress(int currentProgress)
Report a new progress value.
|
void |
signalModelState(ModelState newState)
Inform our federation about a state change.
|
void |
signalModelState(ModelState newState,
String federation)
Inform a federation about a state change.
|
abstract void |
startModel(ModelParameters parameters,
TConnection imbConnection)
Start the model.
|
abstract void |
stopModel()
Stop the model.
|
protected final TConnection connection
public ModelStarter(String[] args, String providedModelName, int providedModelId) throws IMBException
args - String[]; the command line argumentsprovidedModelName - String; name of the modelprovidedModelId - int; id of the modelIMBExceptionpublic abstract void startModel(ModelParameters parameters, TConnection imbConnection)
parameters - ModelParametersimbConnection - TConnection; connection to the IMB hubpublic abstract void stopModel()
public abstract void quitApplication()
public abstract void parameterRequest(ModelParameters parameters)
parameters - ModelParameterspublic void doStartModel(ModelParameters parameters) throws IMBException
parameters - ModelParameters; the parameters needed to start the modelIMBException - ...public void doStopModel()
throws IMBException
IMBException - ...public void doQuitApplication()
public void signalModelProgress(int currentProgress)
throws IMBException
currentProgress - int; the new progress valueIMBExceptionpublic void signalModelState(ModelState newState, String federation) throws IMBException
newState - ModelState; the new statefederation - String; the federationIMBException - ...public void signalModelState(ModelState newState) throws IMBException
newState - ModelState; the new stateIMBException - ...public int getRemotePort()
public String getRemoteHost()
Copyright © 2014–2018 Delft University of Technology. All rights reserved.