Package org.apache.sling.api.resource
Interface DynamicResourceProvider
-
- All Superinterfaces:
ResourceProvider
@Deprecated @ConsumerType public interface DynamicResourceProvider extends ResourceProvider
Deprecated.Use theResourceProvider
A dynamic resource provider is an extension of a resource provider which is only supported if the resource provider has been created through aResourceProviderFactory
. A dynamic resource provider supports access to systems where the connection to the system is dynamic and might go away (due to network changes, updates etc.). TheisLive()
method can be called to check whether the provider is still active. Theclose()
method should be called to free any resources held by this resource provider.- Since:
- 2.2 (Sling API Bundle 2.2.0)
- See Also:
ResourceProviderFactory.getResourceProvider(java.util.Map)
,ResourceProviderFactory.getAdministrativeResourceProvider(java.util.Map)
-
-
Field Summary
-
Fields inherited from interface org.apache.sling.api.resource.ResourceProvider
OWNS_ROOTS, RESOURCE_TYPE_SYNTHETIC, ROOTS, SERVICE_NAME, USE_RESOURCE_ACCESS_SECURITY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.Close the resource provider.boolean
isLive()
Deprecated.Returnstrue
if this resource provider has not been closed yet and can still be used.-
Methods inherited from interface org.apache.sling.api.resource.ResourceProvider
getResource, getResource, listChildren
-
-
-
-
Method Detail
-
isLive
boolean isLive()
Deprecated.Returnstrue
if this resource provider has not been closed yet and can still be used.This method will never throw an exception even after the resource provider has been closed
- Returns:
true
if the resource provider has not been closed yet and is still active.. Once the resource provider has been closed or is not active anymore, this method returnsfalse
.
-
close
void close()
Deprecated.Close the resource provider. Once the resource provider is not used anymore, it should be closed with this method.
-
-