T - type of the pooled object to be proxiedpublic class JdkProxySource<T> extends java.lang.Object implements ProxySource<T>
| Modifier and Type | Field and Description |
|---|---|
private java.lang.ClassLoader |
classLoader |
private java.lang.Class<?>[] |
interfaces |
| Constructor and Description |
|---|
JdkProxySource(java.lang.ClassLoader classLoader,
java.lang.Class<?>[] interfaces)
Create a new proxy source for the given interfaces.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
private final java.lang.ClassLoader classLoader
private final java.lang.Class<?>[] interfaces
public JdkProxySource(java.lang.ClassLoader classLoader,
java.lang.Class<?>[] interfaces)
classLoader - The class loader with which to create the proxyinterfaces - The interfaces to proxypublic T createProxy(T pooledObject, UsageTracking<T> usageTracking)
ProxySourcecreateProxy in interface ProxySource<T>pooledObject - The object to wrapusageTracking - The instance, if any (usually the object pool) to
be provided with usage tracking information for this
wrapped objectpublic T resolveProxy(T proxy)
ProxySourceresolveProxy in interface ProxySource<T>proxy - The proxy object