类 ScopedProxyFactoryBean
java.lang.Object
cn.taketoday.aop.framework.ProxyConfig
cn.taketoday.aop.scope.ScopedProxyFactoryBean
- 所有已实现的接口:
AopInfrastructureBean,Aware,BeanFactoryAware,FactoryBean<Object>,Serializable
public class ScopedProxyFactoryBean
extends ProxyConfig
implements FactoryBean<Object>, BeanFactoryAware, AopInfrastructureBean
Convenient proxy factory bean for scoped objects.
Proxies created using this factory bean are thread-safe singletons and may be injected into shared objects, with transparent scoping behavior.
Proxies returned by this class implement the ScopedObject interface.
This presently allows for removing the corresponding object from the scope,
seamlessly creating a new instance in the scope on next access.
Please note that the proxies created by this factory are class-based proxies by default. This can be customized through switching the "proxyTargetClass" property to "false".
- 从以下版本开始:
- 4.0
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
-
字段概要
从接口继承的字段 cn.taketoday.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Class<?>booleanvoidsetBeanFactory(BeanFactory beanFactory) voidsetTargetBeanName(String targetBeanName) Set the name of the bean that is to be scoped.从类继承的方法 cn.taketoday.aop.framework.ProxyConfig
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toString
-
构造器详细资料
-
ScopedProxyFactoryBean
public ScopedProxyFactoryBean()Create a new ScopedProxyFactoryBean instance.
-
-
方法详细资料
-
setTargetBeanName
Set the name of the bean that is to be scoped. -
setBeanFactory
- 指定者:
setBeanFactory在接口中BeanFactoryAware
-
getObject
- 指定者:
getObject在接口中FactoryBean<Object>
-
getObjectType
- 指定者:
getObjectType在接口中FactoryBean<Object>
-
isSingleton
public boolean isSingleton()- 指定者:
isSingleton在接口中FactoryBean<Object>
-