Class ProxyCreatorSupport
java.lang.Object
org.springframework.aop.framework.ProxyConfig
org.springframework.aop.framework.AdvisedSupport
org.springframework.aop.framework.ProxyCreatorSupport
- All Implemented Interfaces:
- Serializable,- Advised,- TargetClassAware
- Direct Known Subclasses:
- AspectJProxyFactory,- ProxyFactory,- ProxyFactoryBean
Base class for proxy factories.
 Provides convenient access to a configurable AopProxyFactory.
- Since:
- 2.0.3
- Author:
- Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from class org.springframework.aop.framework.AdvisedSupportEMPTY_TARGET_SOURCE
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a new ProxyCreatorSupport instance.ProxyCreatorSupport(AopProxyFactory aopProxyFactory) Create a new ProxyCreatorSupport instance.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddListener(AdvisedSupportListener listener) Add the given AdvisedSupportListener to this proxy configuration.protected voidPropagate advice change event to all AdvisedSupportListeners.protected final AopProxySubclasses should call this to get a new AOP proxy.Return the AopProxyFactory that this ProxyConfig uses.protected final booleanisActive()Subclasses can call this to check whether any AOP proxies have been created yet.voidremoveListener(AdvisedSupportListener listener) Remove the given AdvisedSupportListener from this proxy configuration.voidsetAopProxyFactory(AopProxyFactory aopProxyFactory) Customize the AopProxyFactory, allowing different strategies to be dropped in without changing the core framework.Methods inherited from class org.springframework.aop.framework.AdvisedSupportaddAdvice, addAdvice, addAdvisor, addAdvisor, addAdvisors, addAdvisors, addInterface, adviceIncluded, copyConfigurationFrom, copyConfigurationFrom, countAdvicesOfType, getAdvisorChainFactory, getAdvisorCount, getAdvisors, getAdvisorsInternal, getInterceptorsAndDynamicInterceptionAdvice, getProxiedInterfaces, getTargetClass, getTargetSource, indexOf, indexOf, isInterfaceProxied, isPreFiltered, removeAdvice, removeAdvisor, removeAdvisor, removeInterface, replaceAdvisor, setAdvisorChainFactory, setInterfaces, setPreFiltered, setTarget, setTargetClass, setTargetSource, toProxyConfigString, toStringMethods inherited from class org.springframework.aop.framework.ProxyConfigcopyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClassMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.aop.framework.AdvisedisExposeProxy, isFrozen, isProxyTargetClass, setExposeProxy
- 
Constructor Details- 
ProxyCreatorSupportpublic ProxyCreatorSupport()Create a new ProxyCreatorSupport instance.
- 
ProxyCreatorSupportCreate a new ProxyCreatorSupport instance.- Parameters:
- aopProxyFactory- the AopProxyFactory to use
 
 
- 
- 
Method Details- 
setAopProxyFactoryCustomize the AopProxyFactory, allowing different strategies to be dropped in without changing the core framework.Default is DefaultAopProxyFactory, using dynamic JDK proxies or CGLIB proxies based on the requirements.
- 
getAopProxyFactoryReturn the AopProxyFactory that this ProxyConfig uses.
- 
addListenerAdd the given AdvisedSupportListener to this proxy configuration.- Parameters:
- listener- the listener to register
 
- 
removeListenerRemove the given AdvisedSupportListener from this proxy configuration.- Parameters:
- listener- the listener to remove
 
- 
createAopProxySubclasses should call this to get a new AOP proxy. They should not create an AOP proxy withthisas an argument.
- 
adviceChangedprotected void adviceChanged()Propagate advice change event to all AdvisedSupportListeners.- Overrides:
- adviceChangedin class- AdvisedSupport
- See Also:
 
- 
isActiveprotected final boolean isActive()Subclasses can call this to check whether any AOP proxies have been created yet.
 
-