net.sf.crispy.proxy
Class DynamicProxy
java.lang.Object
net.sf.crispy.proxy.Proxy
net.sf.crispy.proxy.DynamicProxy
- Direct Known Subclasses:
- CommonsProxyFactory, DynamicJdkProxy
- public abstract class DynamicProxy
- extends Proxy
Catch all method invocation. If Executer is registered, then delegate invocation to Executer.
If not, the invoke the method invokeIfExecutorIsNull
.
- Author:
- Linke
Fields inherited from class net.sf.crispy.proxy.Proxy |
log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynamicProxy
protected DynamicProxy()
setExecutor
public void setExecutor(Executor pvExecutor)
getExecutor
public Executor getExecutor()
setInterceptorHandler
public void setInterceptorHandler(InterceptorHandler pvInterceptorHandler)
getInterceptorHandler
public InterceptorHandler getInterceptorHandler()
setStaticProxy
public void setStaticProxy(StaticProxy pvStaticProxy)
getStaticProxy
public StaticProxy getStaticProxy()
getUser
public java.lang.String getUser()
getPasswd
public java.lang.String getPasswd()
setAsynchronousCallback
public void setAsynchronousCallback(AsynchronousCallback pvAsynchronousCallback,
java.lang.String[] pvMethodFilter,
int pvMaxSizeOfThreads)
getAsynchronousCallback
public AsynchronousCallback getAsynchronousCallback()
getMaxThreads
public int getMaxThreads()
isInvocationAsynchronous
public boolean isInvocationAsynchronous()
newInstance
public java.lang.Object newInstance(java.lang.Class pvClass)
- Specified by:
newInstance
in class Proxy
isMethodInFilter
public boolean isMethodInFilter(java.lang.String pvMethodName)
invokeIfExecutorIsNull
protected java.lang.Object invokeIfExecutorIsNull(java.lang.Object pvProxy,
java.lang.reflect.Method pvMethod,
java.lang.Object[] pvArgs,
java.lang.Object pvElseObject)
throws java.lang.Exception
- If not Executor is set. It is the case, if StaticProxy is use in combination with DynamicProxy.
- Throws:
java.lang.Exception
invoke
public java.lang.Object invoke(java.lang.Object pvProxy,
java.lang.reflect.Method pvMethod,
java.lang.Object[] pvArgs)
throws java.lang.Exception
- Delegate invocation to the InvocationHandler.
- Throws:
java.lang.Exception
- See Also:
InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
Copyright © 2005-2006 Crispy. All Rights Reserved.