Author: antelder
Date: Sat Jun 11 04:58:31 2011
New Revision: 1134520
URL: http://svn.apache.org/viewvc?rev=1134520&view=rev
Log:
Update to match the current trunk ServletHost interface
Modified:
tuscany/sca-java-2.x/contrib/modules/host-http-osgi/src/main/java/org/apache/tuscany/sca/http/osgi/OSGiServletHost.java
Modified:
tuscany/sca-java-2.x/contrib/modules/host-http-osgi/src/main/java/org/apache/tuscany/sca/http/osgi/OSGiServletHost.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/host-http-osgi/src/main/java/org/apache/tuscany/sca/http/osgi/OSGiServletHost.java?rev=1134520&r1=1134519&r2=1134520&view=diff
==============================================================================
---
tuscany/sca-java-2.x/contrib/modules/host-http-osgi/src/main/java/org/apache/tuscany/sca/http/osgi/OSGiServletHost.java
(original)
+++
tuscany/sca-java-2.x/contrib/modules/host-http-osgi/src/main/java/org/apache/tuscany/sca/http/osgi/OSGiServletHost.java
Sat Jun 11 04:58:31 2011
@@ -41,6 +41,7 @@ import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
+import org.apache.tuscany.sca.host.http.SecurityContext;
import org.apache.tuscany.sca.host.http.ServletHost;
import org.apache.tuscany.sca.host.http.ServletMappingException;
import org.osgi.framework.BundleActivator;
@@ -102,7 +103,7 @@ public class OSGiServletHost implements
return defaultPortNumber;
}
- public void addServletMapping(String suri, Servlet servlet) throws
ServletMappingException {
+ public String addServletMapping(String suri, Servlet servlet) throws
ServletMappingException {
URI pathURI = URI.create(suri);
// Make sure that the path starts with a /
@@ -127,6 +128,7 @@ public class OSGiServletHost implements
}
logger.info("Added Servlet mapping: " + suri);
+ return suri;
}
public Servlet removeServletMapping(String suri) throws
ServletMappingException {
@@ -272,4 +274,22 @@ public class OSGiServletHost implements
return "osgi";
}
+ @Override
+ public ServletContext getServletContext() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String addServletMapping(String uri, Servlet servlet,
SecurityContext securityContext)
+ throws ServletMappingException {
+ return addServletMapping(uri, servlet);
+ }
+
+ @Override
+ public URL getURLMapping(String uri, SecurityContext securityContext) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}