类 ProxyCreatorSupport
- java.lang.Object
- org.springframework.aop.framework.ProxyConfig
- org.springframework.aop.framework.AdvisedSupport
- org.springframework.aop.framework.ProxyCreatorSupport
- 所有已实现的接口:
Serializable
,Advised
,TargetClassAware
public class ProxyCreatorSupport extends AdvisedSupport
Base class for proxy factories. Provides convenient access to a configurable AopProxyFactory.- 从以下版本开始:
- 2.0.3
- 作者:
- Juergen Hoeller
- 另请参阅:
createAopProxy()
, 序列化表格
字段概要
从类继承的字段 org.springframework.aop.framework.AdvisedSupport
EMPTY_TARGET_SOURCE
构造器概要
构造器 构造器 说明 ProxyCreatorSupport()
Create a new ProxyCreatorSupport instance.ProxyCreatorSupport(AopProxyFactory aopProxyFactory)
Create a new ProxyCreatorSupport instance.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
addListener(AdvisedSupportListener listener)
Add the given AdvisedSupportListener to this proxy configuration.protected void
adviceChanged()
Propagate advice change event to all AdvisedSupportListeners.protected AopProxy
createAopProxy()
Subclasses should call this to get a new AOP proxy.AopProxyFactory
getAopProxyFactory()
Return the AopProxyFactory that this ProxyConfig uses.protected boolean
isActive()
Subclasses can call this to check whether any AOP proxies have been created yet.void
removeListener(AdvisedSupportListener listener)
Remove the given AdvisedSupportListener from this proxy configuration.void
setAopProxyFactory(AopProxyFactory aopProxyFactory)
Customize the AopProxyFactory, allowing different strategies to be dropped in without changing the core framework.从类继承的方法 org.springframework.aop.framework.AdvisedSupport
addAdvice, addAdvice, addAdvisor, addAdvisor, addAdvisors, addAdvisors, addInterface, adviceIncluded, copyConfigurationFrom, copyConfigurationFrom, countAdvicesOfType, getAdvisorChainFactory, getAdvisors, getAdvisorsInternal, getInterceptorsAndDynamicInterceptionAdvice, getProxiedInterfaces, getTargetClass, getTargetSource, indexOf, indexOf, isInterfaceProxied, isPreFiltered, removeAdvice, removeAdvisor, removeAdvisor, removeInterface, replaceAdvisor, setAdvisorChainFactory, setInterfaces, setPreFiltered, setTarget, setTargetClass, setTargetSource, toProxyConfigString, toString, updateAdvisorArray
从类继承的方法 org.springframework.aop.framework.ProxyConfig
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 org.springframework.aop.framework.Advised
isExposeProxy, isFrozen, isProxyTargetClass, setExposeProxy
构造器详细资料
ProxyCreatorSupport
public ProxyCreatorSupport()
Create a new ProxyCreatorSupport instance.
ProxyCreatorSupport
public ProxyCreatorSupport(AopProxyFactory aopProxyFactory)
Create a new ProxyCreatorSupport instance.- 参数:
aopProxyFactory
- the AopProxyFactory to use
方法详细资料
setAopProxyFactory
public void setAopProxyFactory(AopProxyFactory aopProxyFactory)
Customize 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.
getAopProxyFactory
public AopProxyFactory getAopProxyFactory()
Return the AopProxyFactory that this ProxyConfig uses.
addListener
public void addListener(AdvisedSupportListener listener)
Add the given AdvisedSupportListener to this proxy configuration.- 参数:
listener
- the listener to register
removeListener
public void removeListener(AdvisedSupportListener listener)
Remove the given AdvisedSupportListener from this proxy configuration.- 参数:
listener
- the listener to deregister
createAopProxy
protected final AopProxy createAopProxy()
Subclasses should call this to get a new AOP proxy. They should not create an AOP proxy withthis
as an argument.
adviceChanged
protected void adviceChanged()
Propagate advice change event to all AdvisedSupportListeners.
isActive
protected final boolean isActive()
Subclasses can call this to check whether any AOP proxies have been created yet.