Class DispatcherTracker

  • All Implemented Interfaces:
    org.osgi.util.tracker.ServiceTrackerCustomizer<javax.servlet.http.HttpServlet,​javax.servlet.http.HttpServlet>

    public final class DispatcherTracker
    extends org.osgi.util.tracker.ServiceTracker<javax.servlet.http.HttpServlet,​javax.servlet.http.HttpServlet>
    In order to dispatch requests to the Apache Felix Http Bridge, we have to listen for the HttpServlet the bridge module is exposing.
    Author:
    mvrueden
    • Field Summary

      • Fields inherited from class org.osgi.util.tracker.ServiceTracker

        context, filter
    • Constructor Summary

      Constructors 
      Constructor Description
      DispatcherTracker​(org.osgi.framework.BundleContext context, javax.servlet.FilterConfig filterConfig)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.servlet.http.HttpServlet addingService​(org.osgi.framework.ServiceReference ref)  
      javax.servlet.http.HttpServlet getDispatcher()  
      void removedService​(org.osgi.framework.ServiceReference<javax.servlet.http.HttpServlet> reference, javax.servlet.http.HttpServlet service)  
      • Methods inherited from class org.osgi.util.tracker.ServiceTracker

        close, getService, getService, getServiceReference, getServiceReferences, getServices, getServices, getTracked, getTrackingCount, isEmpty, modifiedService, open, open, remove, size, waitForService
    • Constructor Detail

      • DispatcherTracker

        public DispatcherTracker​(org.osgi.framework.BundleContext context,
                                 javax.servlet.FilterConfig filterConfig)
                          throws org.osgi.framework.InvalidSyntaxException
        Throws:
        org.osgi.framework.InvalidSyntaxException
    • Method Detail

      • getDispatcher

        public javax.servlet.http.HttpServlet getDispatcher()
      • addingService

        public javax.servlet.http.HttpServlet addingService​(org.osgi.framework.ServiceReference ref)
        Specified by:
        addingService in interface org.osgi.util.tracker.ServiceTrackerCustomizer<javax.servlet.http.HttpServlet,​javax.servlet.http.HttpServlet>
        Overrides:
        addingService in class org.osgi.util.tracker.ServiceTracker<javax.servlet.http.HttpServlet,​javax.servlet.http.HttpServlet>
      • removedService

        public void removedService​(org.osgi.framework.ServiceReference<javax.servlet.http.HttpServlet> reference,
                                   javax.servlet.http.HttpServlet service)
        Specified by:
        removedService in interface org.osgi.util.tracker.ServiceTrackerCustomizer<javax.servlet.http.HttpServlet,​javax.servlet.http.HttpServlet>
        Overrides:
        removedService in class org.osgi.util.tracker.ServiceTracker<javax.servlet.http.HttpServlet,​javax.servlet.http.HttpServlet>