|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tuscany.sca.http.tomcat.TomcatServer
public class TomcatServer
A Tomcat based implementation of ServletHost.
Constructor Summary | |
---|---|
TomcatServer(WorkScheduler workScheduler)
Constructs a new embedded Tomcat server. |
Method Summary | |
---|---|
void |
addServletMapping(java.lang.String suri,
Servlet servlet)
Add a mapping for an instance of a Servlet. |
java.lang.String |
getContextPath()
Returns the portion of the request URI that indicates the context of the request |
int |
getDefaultPort()
Returns the default port for the server. |
RequestDispatcher |
getRequestDispatcher(java.lang.String suri)
Returns a Servlet request dispatcher for the Servlet mapped to the specified URI. |
Servlet |
getServletMapping(java.lang.String suri)
Returns the Servlet mapped to the given URI. |
java.net.URL |
getURLMapping(java.lang.String suri)
Returns the complete URL mapped to the specified URI. |
Servlet |
removeServletMapping(java.lang.String suri)
Remove a Servlet mapping. |
void |
setContextPath(java.lang.String path)
Sets the portion of the request URI that indicates the context of the request |
void |
setDefaultPort(int port)
Sets the default port for the server. |
void |
stop()
Stop all the started servers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TomcatServer(WorkScheduler workScheduler)
workScheduler
- the WorkScheduler to use to process requests.Method Detail |
---|
public void setDefaultPort(int port)
ServletHost
setDefaultPort
in interface ServletHost
port
- the default portpublic int getDefaultPort()
ServletHost
getDefaultPort
in interface ServletHost
public void stop() throws ServletMappingException
ServletMappingException
public void addServletMapping(java.lang.String suri, Servlet servlet)
ServletHost
addServletMapping
in interface ServletHost
suri
- the URI-mapping for the Servletservlet
- the Servlet that should be invokedpublic java.net.URL getURLMapping(java.lang.String suri) throws ServletMappingException
ServletHost
getURLMapping
in interface ServletHost
ServletMappingException
public Servlet getServletMapping(java.lang.String suri) throws ServletMappingException
ServletHost
getServletMapping
in interface ServletHost
suri
- the URI-mapping for the Servlet
ServletMappingException
public Servlet removeServletMapping(java.lang.String suri)
ServletHost
removeServletMapping
in interface ServletHost
suri
- the URI-mapping for the Servlet
public RequestDispatcher getRequestDispatcher(java.lang.String suri) throws ServletMappingException
ServletHost
getRequestDispatcher
in interface ServletHost
suri
- the URI mapped to a Servlet
ServletMappingException
public java.lang.String getContextPath()
ServletHost
getContextPath
in interface ServletHost
public void setContextPath(java.lang.String path)
ServletHost
setContextPath
in interface ServletHost
path
- the context path
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |