org.glassfish.osgihttp
Class HttpServiceWrapper
java.lang.Object
org.glassfish.osgihttp.HttpServiceWrapper
- All Implemented Interfaces:
- org.osgi.service.http.HttpService
public class HttpServiceWrapper
- extends Object
- implements org.osgi.service.http.HttpService
This is an implementation of HttpService per bundle.
This is what a bundle gets when they look up the servuce in OSGi service
registry. This is needed so that we can unregister all the servlets
registered by a bundle when that bundle goes down without unregistering
the servlet or resource end points. This delegates to GlassFishHttpService
for implementing the actual service.
- Author:
- Sanjeeb.Sahoo@Sun.COM
|
Nested Class Summary |
static class |
HttpServiceWrapper.HttpServiceFactory
This service factory is needed, because the spec requires the following:
If the bundle which performed the registration is stopped or
otherwise "unget"s the Http Service without calling
unregister(java.lang.String) then Http Service must automatically
unregister the registration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpServiceWrapper
public HttpServiceWrapper(GlassFishHttpService delegate,
org.osgi.framework.Bundle registeringBundle)
createDefaultHttpContext
public org.osgi.service.http.HttpContext createDefaultHttpContext()
- Specified by:
createDefaultHttpContext in interface org.osgi.service.http.HttpService
registerServlet
public void registerServlet(String alias,
javax.servlet.Servlet servlet,
Dictionary initParams,
org.osgi.service.http.HttpContext httpContext)
throws javax.servlet.ServletException,
org.osgi.service.http.NamespaceException
- Specified by:
registerServlet in interface org.osgi.service.http.HttpService
- Throws:
javax.servlet.ServletException
org.osgi.service.http.NamespaceException
registerResources
public void registerResources(String alias,
String name,
org.osgi.service.http.HttpContext httpContext)
throws org.osgi.service.http.NamespaceException
- Specified by:
registerResources in interface org.osgi.service.http.HttpService
- Throws:
org.osgi.service.http.NamespaceException
unregister
public void unregister(String alias)
- Specified by:
unregister in interface org.osgi.service.http.HttpService
Copyright © 2012 GlassFish Community. All Rights Reserved.