|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.framework.ProxyConfig
Convenience superclass for configuration used in creating proxies,
to ensure that all proxy creators have consistent properties.
Note that it is no longer possible to configure subclasses to
expose the MethodInvocation. Interceptors should normally manage their own
ThreadLocals if they need to make resources available to advised objects.
If it's absolutely necessary to expose the MethodInvocation, use an
interceptor to do so.
Field Summary | |
protected boolean |
exposeProxy
Should proxies obtained from this configuration expose the AOP proxy for the AopContext class to retrieve for targets? The default is false, as enabling this property may impair performance. |
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
ProxyConfig()
|
Method Summary | |
void |
copyFrom(ProxyConfig other)
Copy configuration from the other config |
AopProxyFactory |
getAopProxyFactory()
|
boolean |
getExposeProxy()
|
boolean |
getOptimize()
|
boolean |
getProxyTargetClass()
|
boolean |
isFrozen()
|
void |
setAopProxyFactory(AopProxyFactory apf)
Customise the AopProxyFactory, allowing different strategies to be dropped in without changing the core framework. |
void |
setExposeProxy(boolean exposeProxy)
Set whether the proxy should be exposed by the AOP framework as a ThreadLocal for retrieval via the AopContext class. |
void |
setFrozen(boolean frozen)
Set whether this config should be frozen. |
void |
setOptimize(boolean optimize)
Set whether proxies should perform agressive optimizations. |
void |
setProxyTargetClass(boolean proxyTargetClass)
Set whether to proxy the target class directly as well as any interfaces. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected final org.apache.commons.logging.Log logger
protected boolean exposeProxy
Constructor Detail |
public ProxyConfig()
Method Detail |
public void copyFrom(ProxyConfig other)
other
- object to copy configuration frompublic boolean getProxyTargetClass()
public void setProxyTargetClass(boolean proxyTargetClass)
proxyTargetClass
- whether to proxy the target class directly as well as any interfacespublic boolean getOptimize()
public void setOptimize(boolean optimize)
optimize
- whether to enable agressive optimizations.
Default is false.public final boolean getExposeProxy()
public final void setExposeProxy(boolean exposeProxy)
this
, the invocation
will not be advised).
exposeProxy
- whether the proxy should be exposed. Default
is false, for optimal pe3rformance.public void setAopProxyFactory(AopProxyFactory apf)
apf
- AopProxyFactory to use. The default uses dynamic
proxies or CGLIB.public AopProxyFactory getAopProxyFactory()
public boolean isFrozen()
public void setFrozen(boolean frozen)
frozen
- is this config frozen?public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |