Package jadex.web.tools.jadexdoc
Class JadexdocServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- jadex.web.tools.jadexdoc.JadexdocServlet
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class JadexdocServlet extends javax.servlet.http.HttpServlet
Front controller servlet for jadexdoc application.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected IIntermediateFuture<IModelInfo>
models
The models.protected IFuture<IExternalAccess>
platform
The platform.
-
Constructor Summary
Constructors Constructor Description JadexdocServlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Shut down the platform on exit.protected void
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Called on each web request.static java.lang.String
getContentUrl(javax.servlet.http.HttpServletRequest req)
Get model content request.static java.lang.String
getModelsUrl(javax.servlet.http.HttpServletRequest req)
Get model list request.void
init()
Init the servlet by starting the Jadex platform.IFuture<IModelInfo>
loadModel(java.lang.String file)
Asynchronously load a model.protected IIntermediateFuture<IModelInfo>
loadModels()
Asynchronously load all models.protected java.util.Set<java.io.File>
scanForModels(java.util.List<java.net.URL> urls)
Scan classpath URLs for loadable models.-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
-
-
-
-
Field Detail
-
platform
protected IFuture<IExternalAccess> platform
The platform.
-
models
protected IIntermediateFuture<IModelInfo> models
The models.
-
-
Method Detail
-
init
public void init() throws javax.servlet.ServletException
Init the servlet by starting the Jadex platform.- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()
Shut down the platform on exit.- Specified by:
destroy
in interfacejavax.servlet.Servlet
- Overrides:
destroy
in classjavax.servlet.GenericServlet
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
Called on each web request.- Overrides:
doGet
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
-
loadModel
public IFuture<IModelInfo> loadModel(java.lang.String file)
Asynchronously load a model.
-
loadModels
protected IIntermediateFuture<IModelInfo> loadModels()
Asynchronously load all models.
-
scanForModels
protected java.util.Set<java.io.File> scanForModels(java.util.List<java.net.URL> urls)
Scan classpath URLs for loadable models.
-
getContentUrl
public static java.lang.String getContentUrl(javax.servlet.http.HttpServletRequest req)
Get model content request.
-
getModelsUrl
public static java.lang.String getModelsUrl(javax.servlet.http.HttpServletRequest req)
Get model list request.
-
-