|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectelectric.servlet.ServletEngine
ServletEngine manages a collection of HTTPContexts and is responsible for delegating an incoming ServletRequest to the matching HTTPContext.
| Constructor Summary | |
ServletEngine(WebServer webServer)
Construct a Servlet container with the specified environment. |
|
| Method Summary | |
void |
addContext(java.lang.String path,
HTTPContext context)
Add a context and associate it with the specified path. |
void |
addContext(java.lang.String path,
HTTPContext context,
boolean startup)
Add a context and associate it with the specified path. |
HTTPContext[] |
getAllContexts()
Return all my contexts |
HTTPContext |
getContext(java.lang.String path)
Return the context associated with the specified path, or null if there is none. |
WebServer |
getWebServer()
|
HTTPContext |
removeContext(java.lang.String path)
Remove the context with the specified path. |
HTTPContext |
service(java.lang.String uri,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Service the servlet request. |
void |
setWebServer(WebServer webServer)
|
void |
shutdown()
Shut down all contexts. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ServletEngine(WebServer webServer)
webServer - The web server.| Method Detail |
public WebServer getWebServer()
public void setWebServer(WebServer webServer)
webServer -
public HTTPContext service(java.lang.String uri,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
uri - The request URI.request - The servlet request.response - The servlet response.
javax.servlet.ServletException - If a servlet exception occurred.
java.io.IOException - If an I/O exception occurred.
public void addContext(java.lang.String path,
HTTPContext context)
throws javax.servlet.ServletException
path - The path.context - The context.
javax.servlet.ServletException - If a servlet exception occurs.
public void addContext(java.lang.String path,
HTTPContext context,
boolean startup)
throws javax.servlet.ServletException
path - The path.context - The context.startup -
javax.servlet.ServletException - If a servlet exception occurs.public HTTPContext removeContext(java.lang.String path)
path - The path.
public HTTPContext getContext(java.lang.String path)
path - The path.public HTTPContext[] getAllContexts()
public void shutdown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||