Interface ResourceProviderSpi
public interface ResourceProviderSpi
This interface must be made available to the
BuildContext
by implementations of resource providers.-
Method Summary
Modifier and TypeMethodDescriptionprovide(ResourceRequest<T> requested) Provide the requested resources.
-
Method Details
-
provide
Provide the requested resources. This method is not intended to be invoked directly. Rather, it must be invoked via
BuildContext.resources(ResourceProvider, ResourceRequest).When properly invoked through
BuildContext.resources(ResourceProvider, ResourceRequest), this method is never invoked concurrently for the same request. It may, however, be invoked concurrently for different requests. Providers that evaluate all possibly provided resources anyway and return only a subset for some kinds of request should therefore invoke themselves (throughBuildContext.resources(ResourceProvider, ResourceRequest)) with a request for all resources and filter the (automatically cached) result.- Type Parameters:
T- the type of the requested (and provided) resource- Parameters:
requested- the requested resources- Returns:
- the provided resource(s) as stream
-