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 Type
    Method
    Description
    createProxy(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

      T createProxy(T pooledObject, UsageTracking<T> usageTracking)
      Creates 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

      T resolveProxy(T proxy)
      Resolves the wrapped object from the given proxy.
      Parameters:
      proxy - The proxy object
      Returns:
      The pooled object wrapped by the given proxy