protected static class Pool.PoolingInvoker<T> extends DelegatingInvoker<T>
Invoker of the proxy.| Modifier and Type | Field and Description |
|---|---|
private Pool<T> |
pool |
private static long |
serialVersionUID |
| Modifier | Constructor and Description |
|---|---|
protected |
PoolingInvoker(Pool<T> pool,
ProxyFactory proxyFactory,
ObjectReference<T> delegateReference,
DelegationMode delegationMode)
Construct a PoolingInvoker.
|
| Modifier and Type | Method and Description |
|---|---|
private Pool<T> |
getPoolInstance() |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Invocation of a method of the proxied object.
|
protected T |
proxy()
Create a proxy for the types of the pool.
|
void |
returnInstanceToPool()
Return the current instance to the pool.
|
delegate, equals, getDelegateReference, getMethodToInvoke, getProxyFactory, hashCode, invokeOnDelegateprivate static final long serialVersionUID
protected PoolingInvoker(Pool<T> pool, ProxyFactory proxyFactory, ObjectReference<T> delegateReference, DelegationMode delegationMode)
pool - the corresponding PoolproxyFactory - the ProxyFactory to usedelegateReference - the ObjectReference with the delegatedelegationMode - one of the delegation modespublic java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
Invokerinvoke in interface Invokerinvoke in class DelegatingInvoker<T>proxy - the proxy instance.method - the method to invoke.args - the arguments of the method.java.lang.Throwable - if the invoked method has thrown.public void returnInstanceToPool()
Resetter returns
the object.protected T proxy()