org.apache.tuscany.sca.http
Interface ServletHost

All Known Implementing Classes:
ExtensibleServletHost

public interface ServletHost

Interface implemented by host environments that allow Servlets to be registered.

This interface allows a system service to register a servlet to handle inbound requests.

Version:
$Rev: 537376 $ $Date: 2007-05-12 11:16:49 +0100 (Sat, 12 May 2007) $

Method Summary
 void addServletMapping(java.lang.String uri, javax.servlet.Servlet servlet)
          Add a mapping for an instance of a Servlet.
 javax.servlet.Servlet removeServletMapping(java.lang.String uri)
          Remove a servlet mapping.
 

Method Detail

addServletMapping

void addServletMapping(java.lang.String uri,
                       javax.servlet.Servlet servlet)
                       throws ServletMappingException
Add a mapping for an instance of a Servlet. This requests that the servlet container direct all requests to the designated mapping to the supplied Servlet instance.

Parameters:
uri - the uri-mapping for the Servlet
servlet - the Servlet that should be invoked
Throws:
ServletMappingException

removeServletMapping

javax.servlet.Servlet removeServletMapping(java.lang.String uri)
                                           throws ServletMappingException
Remove a servlet mapping. This directs the servlet contain not to direct any more requests to a previously registered Servlet.

Parameters:
uri - the uri-mapping for the Servlet
Returns:
the servlet that was registered to the mapping, null if nothing was registered to the mapping
Throws:
ServletMappingException