public class ClassPathResourceManager extends Object implements ResourceManager
EMPTY_RESOURCE_MANAGER
Constructor and Description |
---|
ClassPathResourceManager(ClassLoader classLoader) |
ClassPathResourceManager(ClassLoader loader, Package p) |
ClassPathResourceManager(ClassLoader classLoader, String prefix) |
Modifier and Type | Method and Description |
---|---|
void | close() |
Resource | getResource(String path) Returns a resource for the given path. |
boolean | isResourceChangeListenerSupported() |
void | registerResourceChangeListener(ResourceChangeListener listener) Registers a resource change listener, if the underlying resource manager support it |
void | removeResourceChangeListener(ResourceChangeListener listener) Removes a resource change listener |
public ClassPathResourceManager(ClassLoader loader, Package p)
public ClassPathResourceManager(ClassLoader classLoader, String prefix)
public ClassPathResourceManager(ClassLoader classLoader)
public Resource getResource(String path) throws IOException
ResourceManager
getResource
in interface ResourceManager
path
- The pathIOException
public boolean isResourceChangeListenerSupported()
isResourceChangeListenerSupported
in interface ResourceManager
true
if a resource change listener is supportedpublic void registerResourceChangeListener(ResourceChangeListener listener)
ResourceManager
registerResourceChangeListener
in interface ResourceManager
listener
- The listener to registerpublic void removeResourceChangeListener(ResourceChangeListener listener)
ResourceManager
removeResourceChangeListener
in interface ResourceManager
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2015 JBoss by Red Hat. All rights reserved.