|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.interface21.aop.framework.DefaultProxyConfig
Superclass for AOP Proxy configuration objects.
Subclasses are normally factories from which AOP proxy instances
are obtained directly.
Implements InitializingBean interface. If using outside
a BeanFactory (which will call this lifecycle method automatically)
check subclass documentation as to whether it's necessary to call
a method such as afterPropertiesSet() to complete initialization after
all JavaBean properties has been set.
This class frees subclasses of the housekeeping of interceptors and pointcuts,
but doesn't actually create AOP proxies.
| Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
| Constructor Summary | |
DefaultProxyConfig()
No arg constructor to allow use as a Java bean |
|
DefaultProxyConfig(java.lang.Class[] intfs,
boolean exposeInvocation,
org.aopalliance.AttributeRegistry attributeRegistry)
|
|
| Method Summary | |
void |
addInterceptor(org.aopalliance.Interceptor interceptor)
Add to tail |
void |
addInterceptor(int pos,
org.aopalliance.Interceptor interceptor)
New interfaces will only be available when a new proxy is obtained through getObject(). |
protected void |
addInterface(java.lang.Class newInterface)
Add a new proxied interface. |
void |
addMethodPointcut(int pos,
MethodPointcut pc)
Add a pointcut |
void |
addMethodPointcut(MethodPointcut pc)
Add a pointcut |
void |
afterPropertiesSet()
Lifecycle method. |
int |
countInterceptorsOfType(java.lang.Class interceptorClass)
Count interceptors of the given class |
org.aopalliance.AttributeRegistry |
getAttributeRegistry()
|
boolean |
getExposeInvocation()
Gets the exposeInvocation. |
java.util.List |
getMethodPointcuts()
List of interceptor and pointcut |
java.lang.Class[] |
getProxiedInterfaces()
|
java.lang.Object |
getTarget()
Can return null if now target. |
boolean |
interceptorIncluded(org.aopalliance.MethodInterceptor mi)
Is this interceptor included in any pointcut? |
boolean |
removeInterceptor(org.aopalliance.Interceptor interceptor)
Remove the given interceptor |
protected boolean |
removeInterface(java.lang.Class intf)
Remove a proxied interface. |
boolean |
replaceMethodPointcut(MethodPointcut pc1,
MethodPointcut pc2)
Replace the given pointcut |
void |
setAttributeRegistry(org.aopalliance.AttributeRegistry attributeRegistry)
Sets the attributeRegistry. |
void |
setExposeInvocation(boolean exposeInvocation)
Sets the exposeInvocation property, governing whether the AopContext class will be usable by target objects. |
protected void |
setInterfaces(java.lang.Class[] interfaces)
Sets the interfaces to be proxied. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final org.apache.commons.logging.Log logger
| Constructor Detail |
public DefaultProxyConfig()
public DefaultProxyConfig(java.lang.Class[] intfs,
boolean exposeInvocation,
org.aopalliance.AttributeRegistry attributeRegistry)
| Method Detail |
public boolean getExposeInvocation()
getExposeInvocation in interface ProxyConfigpublic final void setExposeInvocation(boolean exposeInvocation)
exposeInvocation - The exposeInvocation to setpublic void addInterceptor(org.aopalliance.Interceptor interceptor)
ProxyConfigaddInterceptor in interface ProxyConfigProxyConfig.addInterceptor(org.aopalliance.Interceptor)
public final void addInterceptor(int pos,
org.aopalliance.Interceptor interceptor)
addInterceptor in interface ProxyConfigProxyConfig.addInterceptor(int, org.aopalliance.Interceptor)public final boolean removeInterceptor(org.aopalliance.Interceptor interceptor)
removeInterceptor in interface ProxyConfigProxyConfig.removeInterceptor(org.aopalliance.Interceptor)protected final void addInterface(java.lang.Class newInterface)
newInterface - additional interface to proxy.protected final boolean removeInterface(java.lang.Class intf)
intf - public final java.lang.Class[] getProxiedInterfaces()
getProxiedInterfaces in interface ProxyConfigProxyConfig.getProxiedInterfaces()public org.aopalliance.AttributeRegistry getAttributeRegistry()
getAttributeRegistry in interface ProxyConfigProxyConfig.getAttributeRegistry()public void setAttributeRegistry(org.aopalliance.AttributeRegistry attributeRegistry)
attributeRegistry - The attributeRegistry to setprotected void setInterfaces(java.lang.Class[] interfaces)
interfaces - The interfaces to set
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface InitializingBeanInitializingBean.afterPropertiesSet()public java.lang.Object getTarget()
ProxyConfiggetTarget in interface ProxyConfigProxyConfig.getTarget()
public void addMethodPointcut(int pos,
MethodPointcut pc)
ProxyConfigaddMethodPointcut in interface ProxyConfigProxyConfig.addMethodPointcut(int, com.interface21.aop.framework.MethodPointcut)public void addMethodPointcut(MethodPointcut pc)
ProxyConfigaddMethodPointcut in interface ProxyConfigProxyConfig.addMethodPointcut(com.interface21.aop.framework.MethodPointcut)public java.util.List getMethodPointcuts()
ProxyConfiggetMethodPointcuts in interface ProxyConfigProxyConfig.getMethodPointcuts()
public final boolean replaceMethodPointcut(MethodPointcut pc1,
MethodPointcut pc2)
pc1 - pointcut to replacepc2 - pointcut to replace it withpublic final boolean interceptorIncluded(org.aopalliance.MethodInterceptor mi)
mi - interceptor to check inclusion ofpublic final int countInterceptorsOfType(java.lang.Class interceptorClass)
interceptorClass - class of the interceptor to check
|
[Deprecated API] | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | CURRENT API | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||