Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9543

AbstractServiceTracker: add protected constructor with filter properties

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.42.0
    • core-spi
    • None

    Description

      the Whiteboard has to variants on how to track services:

      • track(Class<T> type)
      • track(Class<T> type, Map<String, String> filterProperties)

      however, the second variant is not reflected in the AbstractServiceTracker and thus calling AbstractServiceTracker.start(Whiteboard whiteboard) will currently always call Whiteboard.track(Class).

      i would therefore suggest to introduce a second constructor for AbstractServiceTracker:

      protected AbstractServiceTracker(@NotNull Class<T> type, @NotNull Map<String, String> filterProperties)
      

      subsequently, AbstractServiceTracker.start(Whiteboard whiteboard) would call Whiteboard.track(Class<T> type, Map<String, String> filterProperties) if the tracker has been created a with dedicated filter property map.

      Attachments

        Issue Links

          Activity

            People

              angela Angela Schreiber
              angela Angela Schreiber
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: