Interface ProviderSelection
- All Known Implementing Classes:
DefaultProviderSelection
public interface ProviderSelection
The interface ProviderSelection.
-
Method Summary
Modifier and TypeMethodDescriptionfilter(Predicate<ResourceProvider> filter) Only include theResourceProviders for which the filter evaluates totrue.onBeforeUse(Consumer<ResourceProvider> hook) Register a callback for logging the provider invocation.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.Returns the providers with the requested intents from the project matching the defined filters.default Stream<ResourceProvider> Returns the providers with the requested intents from the project matching the defined filters.without(Class<? extends ResourceProvider> providerType) Exclude providers of the given type when fetching resources.without(ResourceProvider provider) Exclude the given provider when fetching resources.
-
Method Details
-
filter
Only include theResourceProviders for which the filter evaluates totrue.- 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
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
Returns the providers with the requested intents from the project matching the defined filters.- Parameters:
intent- the intentintents- the intents- Returns:
- the stream
-
resources
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
-