Uploaded image for project: 'WildFly Discovery'
  1. WildFly Discovery
  2. WFDISC-26

Add predicate parameter to discovery call

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None

      At present, a discovery call looks like this:

      Discovery.discover(ServiceType st, FilterSpec fs)
      

      We can use the ServiceType to constrain the ServiceURLs returned by the discovery call to having a specific type (Remoting service type) and scheme. We can use the FilterSpec to constrain the attributes to be present and have specific values. However, these don't easily permit defining constraints on multiple combinations of aspects of a certain ServiceURL without doing possibly multiple discovery calls (e.g. get all service URLs which have scheme = http-remoting and https-remoting, or all ServiceURLs with URI having host = myHost).

      If we could supply a Predicate<ServiceURL> parameter to the discovery call, as in:

      Discovery.discover(ServiceType st, FilterSpec fs, Predicate<ServiceURL> p)
      

      which would be used to restrict the set of ServiceURLs returned, these sorts of more advanced discovery calls could be easily implemented.

              Unassigned Unassigned
              rachmato@redhat.com Richard Achmatowicz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: