org.apache.commons.pool2.proxy
Class CglibProxySource<T>

java.lang.Object
  extended by org.apache.commons.pool2.proxy.CglibProxySource<T>
Type Parameters:
T - type of the pooled object to be proxied

public class CglibProxySource<T>
extends Object

Provides proxy objects using CGLib.

Since:
2.0

Constructor Summary
CglibProxySource(Class<? extends T> superclass)
          Create a new proxy source for the given class.
 
Method Summary
 T createProxy(T pooledObject, UsageTracking<T> usageTracking)
          Create a new proxy object, wrapping the given pooled object.
 T resolveProxy(T proxy)
          Obtain the wrapped object from the given proxy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CglibProxySource

public CglibProxySource(Class<? extends T> superclass)
Create a new proxy source for the given class.

Parameters:
superclass - The class to proxy
Method Detail

createProxy

public T createProxy(T pooledObject,
                     UsageTracking<T> usageTracking)
Create a new proxy object, wrapping the given pooled object.

Parameters:
pooledObject - The object to wrap
usageTracking - 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

public T resolveProxy(T proxy)
Obtain the wrapped object from the given proxy.

Parameters:
proxy - The proxy object
Returns:
The pooled objetc wrapped by the given proxy


Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.