Interface IResourceProvider


  • public interface IResourceProvider
    Resource providers provide resources to the resource management system. When asked for a resource the resource management will first check if an instance is already managed. If not it will look for a provider registered for the resource namespace.

    Resource providers may be declared as component itself using the component type com.zfabrik.resourceProvider.

    For example the "components query provider" (com.zfabrik.components/queryProvider) is declared like this:

     com.zfabrik.component.type=com.zfabrik.resourceProvider
     component.className=com.zfabrik.impl.components.query.QueryProvider
     resourceProvider.namespace=com.zfabrik.components.query
     
    Author:
    hb
    See Also:
    IResourceManager.registerProvider(String, IResourceProvider)
    • Method Detail

      • get

        Resource get​(java.lang.String name)
        retrieve a resource. Returns null if the resource does not exist (or will not be made available). Throws ResourceNotAvailableException if the resource cannot be provided due to an error situation.
        Parameters:
        name - name of the resource
        Returns:
        the resource as a handle or null if the resource does not exist (or will not be made available).
        Throws:
        ResourceNotAvailableException