| java.lang.Object org.springframework.aop.framework.ProxyConfig
All known Subclasses: org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator, org.springframework.aop.framework.AbstractSingletonProxyFactoryBean, org.springframework.aop.scope.ScopedProxyFactoryBean, org.springframework.aop.framework.AdvisedSupport,
ProxyConfig | public class ProxyConfig implements Serializable(Code) | | Convenience superclass for configuration used in creating proxies,
to ensure that all proxy creators have consistent properties.
author: Rod Johnson author: Juergen Hoeller See Also: AdvisedSupport |
Method Summary | |
public void | copyFrom(ProxyConfig other) Copy configuration from the other config object. | public boolean | isExposeProxy() Return whether the AOP proxy will expose the AOP proxy for
each invocation. | public boolean | isFrozen() Return whether the config is frozen, and no advice changes can be made. | public boolean | isOpaque() Return whether proxies created by this configuration should be
prevented from being cast to
Advised . | public boolean | isOptimize() Return whether proxies should perform aggressive optimizations. | public boolean | isProxyTargetClass() Return whether to proxy the target class directly as well as any interfaces. | public void | setExposeProxy(boolean exposeProxy) Set whether the proxy should be exposed by the AOP framework as a
ThreadLocal for retrieval via the AopContext class. | public void | setFrozen(boolean frozen) Set whether this config should be frozen.
When a config is frozen, no advice changes can be made. | public void | setOpaque(boolean opaque) Set whether proxies created by this configuration should be prevented
from being cast to
Advised to query proxy status. | public void | setOptimize(boolean optimize) Set whether proxies should perform aggressive optimizations.
The exact meaning of "aggressive optimizations" will differ
between proxies, but there is usually some tradeoff.
Default is "false".
For example, optimization will usually mean that advice changes won't
take effect after a proxy has been created. | public void | setProxyTargetClass(boolean proxyTargetClass) Set whether to proxy the target class directly, instead of just proxying
specific interfaces. | public String | toString() |
exposeProxy | boolean exposeProxy(Code) | | |
copyFrom | public void copyFrom(ProxyConfig other)(Code) | | Copy configuration from the other config object.
Parameters: other - object to copy configuration from |
isExposeProxy | public boolean isExposeProxy()(Code) | | Return whether the AOP proxy will expose the AOP proxy for
each invocation.
|
isFrozen | public boolean isFrozen()(Code) | | Return whether the config is frozen, and no advice changes can be made.
|
isOpaque | public boolean isOpaque()(Code) | | Return whether proxies created by this configuration should be
prevented from being cast to
Advised .
|
isOptimize | public boolean isOptimize()(Code) | | Return whether proxies should perform aggressive optimizations.
|
isProxyTargetClass | public boolean isProxyTargetClass()(Code) | | Return whether to proxy the target class directly as well as any interfaces.
|
setExposeProxy | public void setExposeProxy(boolean exposeProxy)(Code) | | Set whether the proxy should be exposed by the AOP framework as a
ThreadLocal for retrieval via the AopContext class. This is useful
if an advised object needs to call another advised method on itself.
(If it uses this , the invocation will not be advised).
Default is "false", for optimal performance.
|
setFrozen | public void setFrozen(boolean frozen)(Code) | | Set whether this config should be frozen.
When a config is frozen, no advice changes can be made. This is
useful for optimization, and useful when we don't want callers to
be able to manipulate configuration after casting to Advised.
|
setOpaque | public void setOpaque(boolean opaque)(Code) | | Set whether proxies created by this configuration should be prevented
from being cast to
Advised to query proxy status.
Default is "false", meaning that any AOP proxy can be cast to
Advised .
|
setOptimize | public void setOptimize(boolean optimize)(Code) | | Set whether proxies should perform aggressive optimizations.
The exact meaning of "aggressive optimizations" will differ
between proxies, but there is usually some tradeoff.
Default is "false".
For example, optimization will usually mean that advice changes won't
take effect after a proxy has been created. For this reason, optimization
is disabled by default. An optimize value of "true" may be ignored
if other settings preclude optimization: for example, if "exposeProxy"
is set to "true" and that's not compatible with the optimization.
|
setProxyTargetClass | public void setProxyTargetClass(boolean proxyTargetClass)(Code) | | Set whether to proxy the target class directly, instead of just proxying
specific interfaces. Default is "false".
Set this to "true" to force proxying for the TargetSource's exposed
target class. If that target class is an interface, a JDK proxy will be
created for the given interface. If that target class is any other class,
a CGLIB proxy will be created for the given class.
Note: Depending on the configuration of the concrete proxy factory,
the proxy-target-class behavior will also be applied if no interfaces
have been specified (and no interface autodetection is activated).
See Also: org.springframework.aop.TargetSource.getTargetClass |
|
|