Package com.zfabrik.resources.provider
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)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROP_NAMESPACE
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Resource
get(java.lang.String name)
retrieve a resource.default void
init(IResourceProviderContext c)
-
-
-
Field Detail
-
PROP_NAMESPACE
static final java.lang.String PROP_NAMESPACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
default void init(IResourceProviderContext c)
-
get
Resource get(java.lang.String name)
retrieve a resource. Returnsnull
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
-
-