public class SimulationJob extends Object implements Runnable, Comparable<SimulationJob>
SimulationItem
. Pour cela
il utilise le SimulatorLauncher
. Si la simulation echoue
a cause d'une RemoteException alors le job est resoumis dans la queue
de simulation par l'appel de la methode
SimulationService.reportError(fr.ifremer.isisfish.simulator.launcher.SimulatorLauncher, fr.ifremer.isisfish.simulator.launcher.SimulationJob)
.Modifier and Type | Class and Description |
---|---|
static interface |
SimulationJob.PostAction
Interface permettant d'implanter des actions a faire apres la simulation.
|
Modifier and Type | Field and Description |
---|---|
protected String |
id |
protected SimulationItem |
item
item contenant les infos de la simulation
|
protected SimulatorLauncher |
launcher
Le launcher a utiliser pour simuler cet item
|
protected static org.apache.commons.logging.Log |
log
to use log facility, just put in your code: log.info(\"...\");
|
protected boolean |
onlyCheckControl
Set it to true to restart simulation checking without restarting reel simulation
|
protected SimulationJob |
parentJob
si non null contient le
SimulationJob qui a genere ce job, ca
veut dire que ce job est du a un plan de simulation |
protected Set<SimulationJob.PostAction> |
postActions
l'ensemble des post actions a effectuer pour ce job
|
protected int |
priority
la priorite de cet item dans la queue
|
protected SimulationService |
simulationService
Le
SimulationService dans lequel a ete cree ce job |
Constructor and Description |
---|
SimulationJob(SimulationService simulationService,
SimulationItem item,
int priority) |
SimulationJob(SimulationService simulationService,
SimulationJob parentJob,
SimulationItem item,
int priority) |
Modifier and Type | Method and Description |
---|---|
void |
addPostAction(SimulationJob.PostAction postAction) |
int |
compareTo(SimulationJob o)
L'ordre depend :
- de la priorite
- si le nom fini par un chiffre :
- du nom avant le chiffre
- du chiffre
- sinon du nom
|
String |
getId() |
SimulationItem |
getItem() |
SimulatorLauncher |
getLauncher() |
SimulationJob |
getParentJob() |
Set<SimulationJob.PostAction> |
getPostActions() |
int |
getPriority() |
void |
removePostAction(SimulationJob.PostAction postAction) |
void |
restart()
Resoumet un job.
|
void |
run()
Fait la simulation.
|
void |
setLauncher(SimulatorLauncher launcher) |
void |
setOnlyCheckControl(boolean onlyCheckControl) |
void |
stop()
demande l'annulation/arret de ce job.
|
protected static org.apache.commons.logging.Log log
protected transient String id
protected Set<SimulationJob.PostAction> postActions
protected SimulationService simulationService
SimulationService
dans lequel a ete cree ce jobprotected SimulationJob parentJob
SimulationJob
qui a genere ce job, ca
veut dire que ce job est du a un plan de simulationprotected SimulationItem item
protected int priority
protected SimulatorLauncher launcher
protected boolean onlyCheckControl
public SimulationJob(SimulationService simulationService, SimulationItem item, int priority)
public SimulationJob(SimulationService simulationService, SimulationJob parentJob, SimulationItem item, int priority)
public void addPostAction(SimulationJob.PostAction postAction)
public void removePostAction(SimulationJob.PostAction postAction)
public Set<SimulationJob.PostAction> getPostActions()
public String getId()
public void stop()
SimulationServiceListener.simulationStop(fr.ifremer.isisfish.simulator.launcher.SimulationService, fr.ifremer.isisfish.simulator.launcher.SimulationJob)
est leve. Sinon
il le sera lorsque la simulation se sera convenablement arretee.
Dans tous les cas une demande d'arret sur le control de la simulation est fait.
public void restart()
public SimulationJob getParentJob()
public SimulationItem getItem()
public void setLauncher(SimulatorLauncher launcher)
public SimulatorLauncher getLauncher()
public int getPriority()
public void setOnlyCheckControl(boolean onlyCheckControl)
onlyCheckControl
- the onlyCheckControl to setpublic int compareTo(SimulationJob o)
compareTo
in interface Comparable<SimulationJob>
public void run()
SimulatorLauncher
. Le travail restant ici est le nettoyage,
la gestion des erreurs ou l'iteration s'il sagit de plan de simulation
dependant.Copyright © 1999–2020 CodeLutin. All rights reserved.