Class ResourceManager
java.lang.Object
com.gargoylesoftware.base.resource.ResourceManager
An object that manages the resources allocated by the resource factories
- Version:
- $Revision: 1.3 $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFactory
(String name, ResourceFactory factory) Adds a feature to the Factory attribute of the ResourceManager objectfinal Object
getResource
(String name) Return a resource from the specified factoryprivate final ResourceFactory
getResourceFactory
(String name) void
Release all resourcesfinal void
releaseResource
(ManagedResource object) Release the specified resourcetoString()
Return a string representation of this object
-
Field Details
-
resourceFactories_
-
name_
-
-
Constructor Details
-
ResourceManager
public ResourceManager()Create an instance -
ResourceManager
Create an instance- Parameters:
name
- The name of this object.
-
-
Method Details
-
getResource
Return a resource from the specified factory- Parameters:
name
- The name of the factory- Returns:
- The specified resource
-
releaseResource
Release the specified resource- Parameters:
object
- The resource to release
-
releaseAllResources
public void releaseAllResources()Release all resources -
addFactory
Adds a feature to the Factory attribute of the ResourceManager object- Parameters:
name
- The feature to be added to the Factory attributefactory
- The feature to be added to the Factory attribute
-
getResourceFactory
private final ResourceFactory getResourceFactory(String name) throws ResourceFactoryNotFoundException - Parameters:
name
- Description of Parameter- Returns:
- The resourceFactory value
- Throws:
ResourceFactoryNotFoundException
- Description of Exception
-
toString
Return a string representation of this object
-