com.metamatrix.common.pooling.api
Interface ResourceAdapter

All Known Implementing Classes:
JDBCConnectionResourceAdapter, SimpleJDBCConnectionResourceAdapter

public interface ResourceAdapter

The ResourceAdapter is responsible for communicating to the physical resource. This would include creating a new physical resource instance or closing a resource.


Method Summary
 void closePhyicalResourceObject(Resource resource)
          Called to have the adpater have the resource object close itself.
 java.lang.Object createPhysicalResourceObject(ResourceDescriptor descriptor)
          Creates a specific resource based on the descriptor.
 Resource createResource(java.lang.Object physicalResource)
          Creates the Resource specific wrapper that will contain the physicalResource.
 

Method Detail

createResource

Resource createResource(java.lang.Object physicalResource)
                        throws ResourcePoolException
Creates the Resource specific wrapper that will contain the physicalResource.

Parameters:
physicalResource - that will be contained in the wrapper
Throws:
ResourcePoolException - if an error occurs wrapping the physical resource

createPhysicalResourceObject

java.lang.Object createPhysicalResourceObject(ResourceDescriptor descriptor)
                                              throws ResourcePoolException
Creates a specific resource based on the descriptor.

Returns:
Object created by the adapter
Throws:
ResourcePoolException - if an error occurs creating the resource

closePhyicalResourceObject

void closePhyicalResourceObject(Resource resource)
                                throws ResourcePoolException
Called to have the adpater have the resource object close itself.

Throws:
ResourcePoolException - if an error occurs closing resource object.


Copyright © 2009. All Rights Reserved.