Interface ResourceManager
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
CachingResourceManager
,ClassPathResourceManager
,FileResourceManager
,PathResourceManager
Representation of a resource manager. A resource manager knows how to obtain
a resource for a given path.
- Author:
- Stuart Douglas
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetResource
(String path) Returns a resource for the given path.boolean
void
Registers a resource change listener, if the underlying resource manager support itvoid
Removes a resource change listener
-
Field Details
-
EMPTY_RESOURCE_MANAGER
-
-
Method Details
-
getResource
Returns a resource for the given path. It is the responsibility of the called to make sure that the path in Canonicalised.- Parameters:
path
- The path- Returns:
- The resource representing the path, or null if no resource was found.
- Throws:
IOException
-
isResourceChangeListenerSupported
boolean isResourceChangeListenerSupported()- Returns:
true
if a resource change listener is supported
-
registerResourceChangeListener
Registers a resource change listener, if the underlying resource manager support it- Parameters:
listener
- The listener to register- Throws:
IllegalArgumentException
- If resource change listeners are not supported
-
removeResourceChangeListener
Removes a resource change listener- Parameters:
listener
-
-