Class JdkProxyHandler<T>

  • Type Parameters:
    T - type of the wrapped pooled object
    All Implemented Interfaces:
    java.lang.reflect.InvocationHandler

    class JdkProxyHandler<T>
    extends BaseProxyHandler<T>
    implements java.lang.reflect.InvocationHandler
    Java reflection implementation of the proxy handler.
    Since:
    2.0
    • Constructor Detail

      • JdkProxyHandler

        JdkProxyHandler​(T pooledObject,
                        UsageTracking<T> usageTracking)
        Create a Java reflection proxy instance.
        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
    • Method Detail

      • invoke

        public java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method method,
                                       java.lang.Object[] args)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable