Class AspectFilterIndex

java.lang.Object
org.apache.felix.dm.impl.index.AbstractFactoryFilterIndex
org.apache.felix.dm.impl.index.AspectFilterIndex
All Implemented Interfaces:
FilterIndex, ServiceTrackerCustomizer

public class AspectFilterIndex extends AbstractFactoryFilterIndex implements FilterIndex, ServiceTrackerCustomizer
Author:
Felix Project Team
  • Constructor Details

    • AspectFilterIndex

      public AspectFilterIndex()
  • Method Details

    • open

      public void open(org.osgi.framework.BundleContext context)
      Description copied from interface: FilterIndex
      Opens this filter index.
      Specified by:
      open in interface FilterIndex
    • close

      public void close()
      Description copied from interface: FilterIndex
      Closes this filter index.
      Specified by:
      close in interface FilterIndex
    • isApplicable

      public boolean isApplicable(String clazz, String filter)
      Description copied from interface: FilterIndex
      Determines if the combination of class and filter is applicable for this filter index.
      Specified by:
      isApplicable in interface FilterIndex
    • getAllServiceReferences

      public List<org.osgi.framework.ServiceReference> getAllServiceReferences(String clazz, String filter)
      Description copied from interface: FilterIndex
      Returns all service references that match the specified class and filter. Never returns null.
      Specified by:
      getAllServiceReferences in interface FilterIndex
    • serviceChanged

      public void serviceChanged(org.osgi.framework.ServiceEvent event)
      Description copied from interface: FilterIndex
      Invoked whenever a service event occurs.
      Specified by:
      serviceChanged in interface FilterIndex
    • addServiceListener

      public void addServiceListener(org.osgi.framework.ServiceListener listener, String filter)
      Description copied from interface: FilterIndex
      Adds a service listener to this filter index.
      Specified by:
      addServiceListener in interface FilterIndex
    • removeServiceListener

      public void removeServiceListener(org.osgi.framework.ServiceListener listener)
      Description copied from interface: FilterIndex
      Removes a service listener from this filter index. If the listener is not present in the filter index, this method does nothing.
      Specified by:
      removeServiceListener in interface FilterIndex
    • addingService

      public Object addingService(org.osgi.framework.ServiceReference reference)
      Description copied from interface: ServiceTrackerCustomizer
      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.

      Specified by:
      addingService in interface ServiceTrackerCustomizer
      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.
    • toString

      public String toString()
      Overrides:
      toString in class Object