Interface ServiceTrackerCustomizer<S,​T,​U extends org.osgi.framework.ServiceEvent>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addedService​(org.osgi.framework.ServiceReference<S> reference, T service, int trackingCount, int serviceCount, U event)  
      T addingService​(org.osgi.framework.ServiceReference<S> reference)
      A service is being added to the ServiceTracker.
      void modifiedService​(org.osgi.framework.ServiceReference<S> reference, T service, int trackingCount, U event)
      A service tracked by the ServiceTracker has been modified.
      void removedService​(org.osgi.framework.ServiceReference<S> reference, T service, int trackingCount, U event)
      A service tracked by the ServiceTracker has been removed.
    • Method Detail

      • addingService

        T addingService​(org.osgi.framework.ServiceReference<S> reference)
        A service is being added to the ServiceTracker.

        This method is called before a service which matched the search parameters of the ServiceTracker is added to the ServiceTracker. This method should return the service object to be tracked for the specified ServiceReference. The returned service object is stored in the ServiceTracker and is available from the getService and getServices methods.

        Parameters:
        reference - The reference to the service being added to the ServiceTracker.
        Returns:
        The service object to be tracked for the specified referenced service or null if the specified referenced service should not be tracked.
      • addedService

        void addedService​(org.osgi.framework.ServiceReference<S> reference,
                          T service,
                          int trackingCount,
                          int serviceCount,
                          U event)
      • modifiedService

        void modifiedService​(org.osgi.framework.ServiceReference<S> reference,
                             T service,
                             int trackingCount,
                             U event)
        A service tracked by the ServiceTracker has been modified.

        This method is called when a service being tracked by the ServiceTracker has had it properties modified.

        Parameters:
        reference - The reference to the service that has been modified.
        service - The service object for the specified referenced service.
        trackingCount -
        event - TODO
      • removedService

        void removedService​(org.osgi.framework.ServiceReference<S> reference,
                            T service,
                            int trackingCount,
                            U event)
        A service tracked by the ServiceTracker has been removed.

        This method is called after a service is no longer being tracked by the ServiceTracker.

        Parameters:
        reference - The reference to the service that has been removed.
        service - The service object for the specified referenced service.
        trackingCount -
        event - TODO