Package org.opentrafficsim.demo.web
Class OTSDemoServer
- java.lang.Object
-
- org.opentrafficsim.demo.web.OTSDemoServer
-
- All Implemented Interfaces:
Checkable
public class OTSDemoServer extends Object implements Checkable
OTSDemoServer.java.
Copyright (c) 2003-2022 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.- Author:
- Alexander Verbraeck
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
OTSDemoServer.KillThread
Handle the kills of models that ran maxTime minutes.(package private) class
OTSDemoServer.MyResourceHandler
(package private) class
OTSDemoServer.ServerThread
Handle in separate thread to avoid 'lock' of the main application.static class
OTSDemoServer.XHRHandler
Answer handles the events from the web-based user interface for a demo.
-
Field Summary
Fields Modifier and Type Field Description (package private) String
homePage
home page for the web server.(package private) Duration
killDuration
how much time max before being killed?(package private) int
maxProcesses
how many processes max?(package private) int
port
internet port for the web server.(package private) String
rootDirectory
root directory for the web server.(package private) Map<String,Long>
sessionKillMap
the map of sessionIds to the time in msec when the model has to be killed.(package private) Map<String,org.opentrafficsim.core.dsol.OTSModelInterface>
sessionModelMap
the map of sessionIds to OTSModelInterface that handles the animation and updates for the started model.(package private) Map<String,OTSWebModel>
sessionWebModelMap
the map of sessionIds to OTSWebModel that handles the animation and updates for the started model.
-
Constructor Summary
Constructors Constructor Description OTSDemoServer()
Constructor to set any variables to default values if needed.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
check()
static void
main(String[] args)
Run a SuperDemo OTS Web server.
-
-
-
Field Detail
-
sessionModelMap
final Map<String,org.opentrafficsim.core.dsol.OTSModelInterface> sessionModelMap
the map of sessionIds to OTSModelInterface that handles the animation and updates for the started model.
-
sessionWebModelMap
final Map<String,OTSWebModel> sessionWebModelMap
the map of sessionIds to OTSWebModel that handles the animation and updates for the started model.
-
sessionKillMap
final Map<String,Long> sessionKillMap
the map of sessionIds to the time in msec when the model has to be killed.
-
maxProcesses
int maxProcesses
how many processes max?
-
killDuration
Duration killDuration
how much time max before being killed?
-
rootDirectory
String rootDirectory
root directory for the web server.
-
homePage
String homePage
home page for the web server.
-
port
int port
internet port for the web server.
-
-