com.gargoylesoftware.base.resource
public abstract class ResourceFactory extends Object
Version: $Revision: 1.3 $
| Field Summary | |
|---|---|
| Map | resourceManagerToResourceListMap_ |
| Constructor Summary | |
|---|---|
| ResourceFactory()
Create a factory | |
| Method Summary | |
|---|---|
| void | deregisterResource(ResourceManager resourceManager, ManagedResource resource) |
| ManagedResource | getResource(ResourceManager resourceManager)
Allocate a resource for the specified store
|
| protected abstract ManagedResource | getResourceImpl(ResourceManager resourceManager)
Subclasses will override this to perform the actual allocation of the
resource.
|
| void | registerResource(ResourceManager resourceManager, ManagedResource resource) |
| abstract boolean | reinitializeResourceIfPossible(ManagedResource resource)
Reinitialize the resource to a known state. |
| void | releaseAllResources(ResourceManager resourceManager)
Release all the resources that had been allocated by the specified
store.
|
| void | releaseResource(ResourceManager resourceManager, ManagedResource resource)
Release the specified resource. |
| protected abstract void | releaseResourceImpl(ResourceManager resourceManager, ManagedResource resource)
Subclasses will override this to perform the actual release of the
resource.
|
Parameters: resourceManager The object that is managing the resource allocation
Returns: The new resource
Throws: ResourceException If an error occurs
Parameters: resourceManager The object that is managing the resource allocation
Returns: The new resource
Throws: Exception If an error occurs
Parameters: resource the resource to reinitialize
Returns: true if the resource was successfully reinitialized
Parameters: resourceManager The object that is managing the resource allocation
Throws: ResourceException If an error occurs
Parameters: resource The resource that we are releasing resourceManager The object that is managing the resource allocation
Throws: ResourceException If an error occurs
Parameters: resource The resource to release resourceManager The object that is managing the resource allocation
Throws: Exception If an error occurs