Interface FilterIndex

All Known Implementing Classes:
AdapterFilterIndex, AspectFilterIndex, MultiPropertyFilterIndex

public interface FilterIndex
A filter index is an interface you can implement to create your own, optimized index for specific filter expressions.
Author:
Felix Project Team
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addServiceListener(org.osgi.framework.ServiceListener listener, String filter)
    Adds a service listener to this filter index.
    void
    Closes this filter index.
    List<org.osgi.framework.ServiceReference>
    Returns all service references that match the specified class and filter.
    boolean
    isApplicable(String clazz, String filter)
    Determines if the combination of class and filter is applicable for this filter index.
    void
    open(org.osgi.framework.BundleContext context)
    Opens this filter index.
    void
    removeServiceListener(org.osgi.framework.ServiceListener listener)
    Removes a service listener from this filter index.
    void
    serviceChanged(org.osgi.framework.ServiceEvent event)
    Invoked whenever a service event occurs.
  • Method Details

    • open

      void open(org.osgi.framework.BundleContext context)
      Opens this filter index.
    • close

      void close()
      Closes this filter index.
    • isApplicable

      boolean isApplicable(String clazz, String filter)
      Determines if the combination of class and filter is applicable for this filter index.
    • getAllServiceReferences

      List<org.osgi.framework.ServiceReference> getAllServiceReferences(String clazz, String filter)
      Returns all service references that match the specified class and filter. Never returns null.
    • serviceChanged

      void serviceChanged(org.osgi.framework.ServiceEvent event)
      Invoked whenever a service event occurs.
    • addServiceListener

      void addServiceListener(org.osgi.framework.ServiceListener listener, String filter)
      Adds a service listener to this filter index.
    • removeServiceListener

      void removeServiceListener(org.osgi.framework.ServiceListener listener)
      Removes a service listener from this filter index. If the listener is not present in the filter index, this method does nothing.