Interface ProviderSelection

All Known Implementing Classes:
DefaultProviderSelection

public interface ProviderSelection
The interface ProviderSelection.
  • Method Details

    • filter

      Only include the ResourceProviders for which the filter evaluates to true.
      Parameters:
      filter - the filter
      Returns:
      the provider selection
    • without

      Exclude the given provider when fetching resources.
      Parameters:
      provider - the provider
      Returns:
      the bound resource query
    • without

      ProviderSelection without(Class<? extends ResourceProvider> providerType)
      Exclude providers of the given type when fetching resources.
      Parameters:
      providerType - the provider type
      Returns:
      the bound resource query
    • onBeforeUse

      Register a callback for logging the provider invocation.
      Parameters:
      hook - the hook
      Returns:
      the bound resource query
    • select

      Returns the providers with the requested intents from the project matching the defined filters.
      Parameters:
      intents - the intents
      Returns:
      the stream
    • select

      default Stream<ResourceProvider> select(Intent intent, Intent... intents)
      Returns the providers with the requested intents from the project matching the defined filters.
      Parameters:
      intent - the intent
      intents - the intents
      Returns:
      the stream
    • resources

      <T extends Resource> Stream<T> resources(ResourceRequest<T> requested)
      Returns the requested resources using the providers with the requested intents from the project passed to constructor and the defined filters.
      Type Parameters:
      T - the requested resource type
      Parameters:
      requested - the resource request
      Returns:
      the stream