|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.ifremer.isisfish.simulator.launcher.InProcessSimulatorLauncher
public class InProcessSimulatorLauncher
Fait une simulation dans la meme jvm.
| Nested Class Summary | |
|---|---|
protected class |
InProcessSimulatorLauncher.ObjectCreationListener
|
protected class |
InProcessSimulatorLauncher.SimThread
|
| Field Summary | |
|---|---|
protected SimulationStorage |
simulation
|
| Constructor Summary | |
|---|---|
InProcessSimulatorLauncher()
|
|
| Method Summary | |
|---|---|
protected AspectClassLoader |
changeClassLoader(Thread thread,
File directory)
Modifie le classloader du thread passé en paramètre. |
int |
getCheckProgressionInterval()
Retourne l'intervalle de temps a utiliser entre deux verification de progresssion. |
SimulationStorage |
getSimulationStorage(SimulationService simulationService,
SimulationControl control)
Retourne le storage où est stockée la simulation. |
protected void |
initSimulationListener(SimulationContext context)
|
protected SimulationStorage |
localSimulate(SimulationControl control,
SimulationStorage simulation)
fait la simulation en local dans un nouveau thread, cela permet pour chaque simulation d'avoir les bons scripts dans le classloader et non pas d'utiliser les scripts d'une autre simulation |
protected SimulationStorage |
localSimulateSameThread(SimulationControl control,
SimulationStorage simulation)
Cree le simulation context, creer le ClassLoader, met en place les AOP, met a jour des informations sur la simulation et lance la simulation en local |
int |
maxSimulationThread()
Retourne le nombre maximal de thread de simulations simultanées supporté. |
protected void |
message(SimulationControl control,
String message)
Display message both in commons-logging and control text progress. |
void |
simulate(SimulationService simulationService,
SimulationItem simulationItem)
Execute une simulation. |
void |
simulationStopRequest(SimulationJob job)
Called if a started simulation has been ask to stop. |
String |
toString()
|
void |
updateControl(SimulationService simulationService,
SimulationControl control)
Met à jour la progression. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected SimulationStorage simulation
| Constructor Detail |
|---|
public InProcessSimulatorLauncher()
| Method Detail |
|---|
public void simulate(SimulationService simulationService,
SimulationItem simulationItem)
throws RemoteException
simulate in interface SimulatorLaunchersimulationService - le SimulationService qui a initie
la simulationsimulationItem - l'item contenant toutes les infos nécessaire au
lancement de la simulation
IMPORTANT Quoi qu'il arrive
RemoteException - Si pour l'execution de la simulation
on utilise des resources distantes (serveurs) et que ceux si non pas pu
etre contacte. Dans ce cas la simulation n'a pas ete faite et cette
exception est levee.
public SimulationStorage getSimulationStorage(SimulationService simulationService,
SimulationControl control)
throws RemoteException
SimulatorLauncher
getSimulationStorage in interface SimulatorLaunchersimulationService - le SimulationService qui a initie
la simulationcontrol - le control de la simulation
RemoteException - Si pour l'execution de la simulation
on utilise des resources distantes (serveurs) et que ceux si non pas pu
etre contacte.
public void updateControl(SimulationService simulationService,
SimulationControl control)
throws RemoteException
SimulatorLauncher
updateControl in interface SimulatorLaunchersimulationService - le SimulationService qui a initie
la simulationcontrol - le control de la simulation
RemoteException - Si pour l'execution de la simulation
on utilise des resources distantes (serveurs) et que ceux si non pas pu
etre contacte.public int maxSimulationThread()
SimulatorLauncher
maxSimulationThread in interface SimulatorLauncherpublic int getCheckProgressionInterval()
SimulatorLauncher
getCheckProgressionInterval in interface SimulatorLauncherpublic String toString()
toString in class Object
protected void message(SimulationControl control,
String message)
control - controlmessage - message to display
protected SimulationStorage localSimulate(SimulationControl control,
SimulationStorage simulation)
control - le controleur de simulation, peut-etre null si on ne
souhaite pas controler la simulationsimulation - la simulation a faire
protected AspectClassLoader changeClassLoader(Thread thread,
File directory)
Sert pour les simulations pour qu'elles puissent trouver les script, rule et export
thread - le thread dont on souhaite modifier le classloader ou nulldirectory - le répertoire qui servira pour le classloader
protected SimulationStorage localSimulateSameThread(SimulationControl control,
SimulationStorage simulation)
control - le controleur de simulation, peut-etre null si on ne
souhaite pas controler la simulationsimulation - la simulation a faire
protected void initSimulationListener(SimulationContext context)
throws Exception
Exceptionpublic void simulationStopRequest(SimulationJob job)
simulationStopRequest in interface SimulatorLauncherjob - job to stop
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||