| java.lang.Object org.cougaar.util.GenericStateModelAdapter org.cougaar.lib.web.engine.AbstractServletEngine
All known Subclasses: org.cougaar.lib.web.micro.http.HttpServletEngine, org.cougaar.lib.web.tomcat.TomcatServletEngine,
AbstractServletEngine | abstract public class AbstractServletEngine extends GenericStateModelAdapter implements Component(Code) | | This component is a base class for
ServletEngineService providers.
This class reads the parameters, scans for available ports, starts the
server, and advertises our service.
If HTTPS is enabled, the "cougaar.rc" must contain:
org.cougaar.web.keystore=FILENAME
org.cougaar.web.keypass=Password
where the FILENAME is relative to the "$cougaar.install.path".
See
Parameters for "cougaar.rc" documentation.
All the following parameters are also supported as prefix-free component
parameters, e.g. "http.port=1234".
|
Inner Class :final protected static class UsedPorts | |
configure | abstract protected void configure(int httpPort, int httpsPort, Map options)(Code) | | Set the HTTP and HTTPS (SSL) configuration -- this is called before
AbstractServletEngine.startServer() .
Parameters: httpPort - the HTTP port, or -1 if HTTP is disabled Parameters: httpsPort - the HTTPS port, or -1 if HTTP is disabled Parameters: options - a Map of String keys to String values that specifyadditional server options (e.g. "http.acceptCount"). |
findOrMakeNamingEntries | protected Map findOrMakeNamingEntries(UsedPorts usedPorts, Servlet gateway)(Code) | | |
makeNamingEntries | protected Map makeNamingEntries(UsedPorts usedPorts, Servlet gateway)(Code) | | |
setGateway | abstract protected void setGateway(Servlet s) throws ServletException(Code) | | Set the single Servlet that will handle all service
requests for the running server.
Even though this is defined as setGateway(Servlet), all calls
to:
Servlet.service(ServletRequest, ServletResponse)
must pass in the HTTP subclasses of these request/response interfaces:
Servlet.service(HttpServletRequest, HttpServletResponse)
, since this is an HTTP/HTTPS server engine.
|
startServer | abstract protected void startServer() throws BindException, IOException(Code) | | Start the server.
throws: BindException - if the either the HTTP or HTTPS port is already inuse. The base class will then call "configure" with different port(s)and try to start again. throws: IOException - some other server exception occurred. |
startServer | protected UsedPorts startServer(Map config) throws Exception(Code) | | Start the server, scan the port range based upon the
"org.cougaar.lib.web.scanRange" property.
See the "@property" javadocs at the top of this file.
used ports |
unload | public void unload()(Code) | | |
|
|