|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.eclipse.ohf.stem.ui.ge.servlet.SlideShowServlet
public class SlideShowServlet
SlideShowServlet sends back a valid KML file for a GET or POST action
The way that it works is this: A KML file is launched to GoogleEarth that has a networklink with the following URL http://localhost:8080/SlideShow/slideshow?id=&folder= where is a unique id is the directory containing the kml files generated by STEM. GoogleEarth will then issue http GET requests with the specified URL which will cause this servlet's doGet() method to be invoked. It retrieves the corect file in one of 2 ways: The servlet keeps a map of info keyed by the that has a list of files that was found in the folder and a counter that is used to send back the Nth file. and increment N. If a filename was specified in the URL http://localhost:8080/STEM/slideshow?...file= then that file will be read and returned to GE. This file will always be the most recently generated KML file. This will help ensure that GE does not fall behind the STEM simulation.
Field Summary | |
---|---|
static java.lang.String |
CONTEXT
Servlet context. |
static boolean |
DEBUG
Used by this and other servlets to control debug output |
Constructor Summary | |
---|---|
SlideShowServlet()
|
Method Summary | |
---|---|
static void |
debug(java.lang.String msg)
print debug messages to the server log. |
static void |
error(java.lang.String msg,
java.lang.Throwable e)
debug output for exceptions |
java.io.File[] |
getFiles(SlideShowInfo info)
Get the list of files in the folder |
static SlideShowInfo |
getInfo(java.lang.String key)
return the info instance associated with the specified key |
void |
init(javax.servlet.ServletConfig config)
Handle the initial setup |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean DEBUG
public static final java.lang.String CONTEXT
Constructor Detail |
---|
public SlideShowServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public java.io.File[] getFiles(SlideShowInfo info)
info
- instance that holds misc info about session
public static SlideShowInfo getInfo(java.lang.String key)
key
-
public static void debug(java.lang.String msg)
msg
- public static void error(java.lang.String msg, java.lang.Throwable e)
msg
- e
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |