Package org.apache.commons.pool2.proxy
Class CglibProxySource<T>
java.lang.Object
org.apache.commons.pool2.proxy.CglibProxySource<T>
- Type Parameters:
T- type of the pooled object to be proxied
- All Implemented Interfaces:
ProxySource<T>
Provides proxy objects using CGLib.
- Since:
- 2.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCglibProxySource(Class<? extends T> superclass) Constructs a new proxy source for the given class. -
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.toString()
-
Field Details
-
superclass
-
-
Constructor Details
-
CglibProxySource
Constructs a new proxy source for the given class.- Parameters:
superclass- The class to proxy
-
-
Method Details
-
createProxy
Description copied from interface:ProxySourceCreates a new proxy object, wrapping the given pooled object.- Specified by:
createProxyin interfaceProxySource<T>- 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
Description copied from interface:ProxySourceResolves the wrapped object from the given proxy.- Specified by:
resolveProxyin interfaceProxySource<T>- Parameters:
proxy- The proxy object- Returns:
- The pooled object wrapped by the given proxy
-
toString
-