public final class ResourceManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
name_ |
private java.util.Map |
resourceFactories_ |
| Constructor and Description |
|---|
ResourceManager()
Create an instance
|
ResourceManager(java.lang.String name)
Create an instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFactory(java.lang.String name,
ResourceFactory factory)
Adds a feature to the Factory attribute of the ResourceManager object
|
java.lang.Object |
getResource(java.lang.String name)
Return a resource from the specified factory
|
private ResourceFactory |
getResourceFactory(java.lang.String name) |
void |
releaseAllResources()
Release all resources
|
void |
releaseResource(ManagedResource object)
Release the specified resource
|
java.lang.String |
toString()
Return a string representation of this object
|
private java.util.Map resourceFactories_
private final java.lang.String name_
public ResourceManager()
public ResourceManager(java.lang.String name)
name - The name of this object.public final java.lang.Object getResource(java.lang.String name)
name - The name of the factorypublic final void releaseResource(ManagedResource object)
object - The resource to releasepublic void releaseAllResources()
public void addFactory(java.lang.String name,
ResourceFactory factory)
name - The feature to be added to the Factory attributefactory - The feature to be added to the Factory attributeprivate final ResourceFactory getResourceFactory(java.lang.String name) throws ResourceFactoryNotFoundException
name - Description of ParameterResourceFactoryNotFoundException - Description of Exceptionpublic java.lang.String toString()
toString in class java.lang.Object