Class NameDiscoverers

java.lang.Object
org.apache.commons.discovery.resource.names.ResourceNameDiscoverImpl
org.apache.commons.discovery.resource.names.NameDiscoverers
All Implemented Interfaces:
ResourceNameDiscover

Holder for multiple ResourceNameDiscover instances. The result is the union of the results from each (not a chained sequence, where results feed the next in line.
  • Constructor Details

    • NameDiscoverers

      public NameDiscoverers()
      Construct a new resource name discoverer
  • Method Details

    • setLog

      @Deprecated public static void setLog(org.apache.commons.logging.Log _log)
      Deprecated.
      This method is not thread-safe
      Sets the Log for this class.
      Parameters:
      _log - This class Log
    • addResourceNameDiscover

      Specify an discover to be used in searching. The order of discover determines the order of the result. It is recommended to add the most specific discover first.
      Parameters:
      discover - The discover to be added
    • getResourceNameDiscover

      Retrieve the discover positioned at the given index.
      Parameters:
      idx - The discover index position client is requiring
      Returns:
      The discover positioned at the input index
    • size

      protected int size()
      Returns the current size of set discovers.
      Returns:
      The current size of set discovers
    • findResourceNames

      Locate names of resources that are bound to resourceName.
      Specified by:
      findResourceNames in interface ResourceNameDiscover
      Specified by:
      findResourceNames in class ResourceNameDiscoverImpl
      Parameters:
      resourceName - The resource name to locate
      Returns:
      A new ResourceNameIterator