|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.framework.DefaultAopProxyFactory
public class DefaultAopProxyFactory
Default AopProxyFactory
implementation,
creating either a CGLIB proxy or a JDK dynamic proxy.
Creates a CGLIB proxy if one the following is true
for a given AdvisedSupport
instance:
Note that the CGLIB library classes have to be present on the class path if an actual CGLIB proxy needs to be created.
In general, specify "proxyTargetClass" to enforce a CGLIB proxy, or specify one or more interfaces to use a JDK dynamic proxy.
ProxyConfig.setOptimize(boolean)
,
ProxyConfig.setProxyTargetClass(boolean)
,
AdvisedSupport.setInterfaces(java.lang.Class[])
,
Serialized FormNested Class Summary | |
---|---|
private static class |
DefaultAopProxyFactory.CglibProxyFactory
Inner factory class used to just introduce a CGLIB2 dependency when actually creating a CGLIB proxy. |
Field Summary | |
---|---|
private static boolean |
cglibAvailable
Whether the CGLIB2 library is present on the classpath |
Constructor Summary | |
---|---|
DefaultAopProxyFactory()
|
Method Summary | |
---|---|
AopProxy |
createAopProxy(AdvisedSupport config)
Create an AopProxy for the given AOP configuration. |
private boolean |
hasNoUserSuppliedProxyInterfaces(AdvisedSupport config)
Determine whether the supplied AdvisedSupport has only the
SpringProxy interface specified
(or no proxy interfaces specified at all). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final boolean cglibAvailable
Constructor Detail |
---|
public DefaultAopProxyFactory()
Method Detail |
---|
public AopProxy createAopProxy(AdvisedSupport config) throws AopConfigException
AopProxyFactory
AopProxy
for the given AOP configuration.
createAopProxy
in interface AopProxyFactory
config
- the AOP configuration in the form of an
AdvisedSupport object
AopConfigException
- if the configuration is invalidprivate boolean hasNoUserSuppliedProxyInterfaces(AdvisedSupport config)
AdvisedSupport
has only the
SpringProxy
interface specified
(or no proxy interfaces specified at all).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |