HttpServiceTracker

public class HttpServiceTracker extends ServiceTracker

This is the HttpServiceTracker that will be created by org.motechproject.osgi.web.BlueprintApplicationContextTracker for bundles that have a Gemini Blueprint context and the Blueprint-Enabled header in their manifest. This class is responsible for tracking the org.osgi.service.http.HttpService. Once it becomes available, an OSGiDispatcherServlet is created and registered with service, which means exposing and HTTP endpoint for the bundle. We also create and register an org.motechproject.osgi.web.OSGiDispatcherServlet with a context built upon the context created by the Gemini Extender. The dispatcher servlet created here allows HTTP access to the bundle, by making its Spring context the parent of the dispatchers context.

Constructors

HttpServiceTracker

public HttpServiceTracker(BundleContext context, Map<String, String> resourceMapping)

Methods

addingService

public Object addingService(ServiceReference ref)

removedService

public void removedService(ServiceReference ref, Object service)

start

public void start()

unregister

public void unregister()