public abstract class ResourceFactory extends Object
| Constructor and Description |
|---|
ResourceFactory()
Create a factory
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
public final ManagedResource getResource(ResourceManager resourceManager) throws ResourceException
resourceManager - The object that is managing the resource
allocationResourceException - If an error occurspublic final void releaseResource(ResourceManager resourceManager, ManagedResource resource) throws ResourceException
resource - The resource that we are releasingresourceManager - The object that is managing the resource
allocationResourceException - If an error occurspublic void releaseAllResources(ResourceManager resourceManager) throws ResourceException
resourceManager - The object that is managing the resource
allocationResourceException - If an error occurspublic abstract boolean reinitializeResourceIfPossible(ManagedResource resource)
resource - the resource to reinitializeprotected abstract ManagedResource getResourceImpl(ResourceManager resourceManager) throws Exception
resourceManager - The object that is managing the resource
allocationException - If an error occursprotected abstract void releaseResourceImpl(ResourceManager resourceManager, ManagedResource resource) throws Exception
resource - The resource to releaseresourceManager - The object that is managing the resource
allocationException - If an error occursCopyright © 1998–2025 Gargoyle Software Inc.. All rights reserved.