T - type of the wrapped pooled objectclass BaseProxyHandler<T>
extends java.lang.Object
ProxiedObjectPool.| Modifier and Type | Field and Description |
|---|---|
private T |
pooledObject |
private UsageTracking<T> |
usageTracking |
| Constructor and Description |
|---|
BaseProxyHandler(T pooledObject,
UsageTracking<T> usageTracking)
Create a new wrapper for the given pooled object.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) T |
disableProxy()
Disable the proxy wrapper.
|
(package private) java.lang.Object |
doInvoke(java.lang.reflect.Method method,
java.lang.Object[] args)
Invoke the given method on the wrapped object.
|
(package private) T |
getPooledObject()
Obtain the wrapped, pooled object.
|
(package private) void |
validateProxiedObject()
Check that the proxy is still valid (i.e.
|
private volatile T pooledObject
private final UsageTracking<T> usageTracking
BaseProxyHandler(T pooledObject, UsageTracking<T> usageTracking)
pooledObject - The object to wrapusageTracking - The instance, if any (usually the object pool) to
be provided with usage tracking information for this
wrapped objectT getPooledObject()
T disableProxy()
IllegalStateException.void validateProxiedObject()
disableProxy()
has not been called).java.lang.IllegalStateException - if disableProxy() has been calledjava.lang.Object doInvoke(java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
method - The method to invokeargs - The arguments to the methodjava.lang.Throwable - If the method invocation fails