public interface ExternalResourceProvider
Represents an external source where the resource files might be acquired from. These external resources might be
various: database drivers, different kind of configurations and so on.
-
Method Summary
Modifier and TypeMethodDescriptionfetchExternalResource(ExternalResourceDescriptor descriptor) Fetches the resource determined by the descriptor.voidInitializes the External Resource Provider based on the given set of properties.Performs a listing of all resources that are available.
-
Method Details
-
initialize
Initializes the External Resource Provider based on the given set of properties.- Parameters:
context- Initialization context for the provider containing configuration properties
-
listResources
Performs a listing of all resources that are available.- Returns:
- The result is a list of descriptors for the available resources.
- Throws:
IOException- Thrown on failure to list resources
-
fetchExternalResource
Fetches the resource determined by the descriptor. This usually happens based onExternalResourceDescriptor#getLocationbut implementations might differ.- Parameters:
descriptor- External Resource reference to be fetched- Returns:
- Input Stream for external resource fetched
- Throws:
IOException- Thrown on failure to fetch resources
-