org.apache.sling.api.resource
Interface DynamicResourceProvider
- All Superinterfaces:
- ResourceProvider
public interface DynamicResourceProvider
- extends ResourceProvider
A dynamic resource provider is an extension of a resource provider which
is only supported if the resource provider has been created through
a ResourceProviderFactory
.
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.).
The isLive()
method can be called to check whether the
provider is still active.
The close()
method should be called to free any resources
held by this resource provider.
- Since:
- 2.2
- See Also:
ResourceProviderFactory.getResourceProvider(java.util.Map)
,
ResourceProviderFactory.getAdministrativeResourceProvider(java.util.Map)
Method Summary |
void |
close()
Close the resource provider. |
boolean |
isLive()
Returns true if this resource provider has not been closed
yet and can still be used. |
isLive
boolean isLive()
- Returns
true
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 returns false
.
close
void close()
- Close the resource provider.
Once the resource provider is not used anymore, it should be closed with
this method.
Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.