Package org.apache.commons.pool2.proxy
Interface ProxySource<T>
- Type Parameters:
T- type of the pooled object to be proxied
- All Known Implementing Classes:
CglibProxySource,JdkProxySource
interface ProxySource<T>
The interface that any provider of proxy instances must implement to allow the
ProxiedObjectPool to create proxies as required.- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptioncreateProxy(T pooledObject, UsageTracking<T> usageTracking) Creates a new proxy object, wrapping the given pooled object.resolveProxy(T proxy) Resolves the wrapped object from the given proxy.
-
Method Details
-
createProxy
Creates a new proxy object, wrapping the given pooled object.- Parameters:
pooledObject- The object to wrapusageTracking- The instance, if any (usually the object pool) to be provided with usage tracking information for this wrapped object- Returns:
- the new proxy object
-
resolveProxy
Resolves the wrapped object from the given proxy.- Parameters:
proxy- The proxy object- Returns:
- The pooled object wrapped by the given proxy
-