diff options
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ExtensibleServletHost.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ExtensibleServletHost.java b/sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ExtensibleServletHost.java index 4dfa1dd8a3..668b069bf9 100644 --- a/sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ExtensibleServletHost.java +++ b/sca-java-2.x/trunk/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/ExtensibleServletHost.java @@ -68,6 +68,16 @@ public class ExtensibleServletHost implements ServletHost { // For now just select the first one getDefaultServletHost().addServletMapping(uri, servlet); } + + public void addServletMapping(String uri, Servlet servlet, SecurityContext securityContext) throws ServletMappingException { + if (servletHosts.getServletHosts().isEmpty()) { + throw new ServletMappingException("No servlet host available"); + } + + // TODO implement selection of the correct Servlet host based on the mapping + // For now just select the first one + getDefaultServletHost().addServletMapping(uri, servlet, securityContext); + } public Servlet getServletMapping(String uri) throws ServletMappingException { if (servletHosts.getServletHosts().isEmpty()) { |