|
spring-aop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.aop.framework.ProxyConfig
org.springframework.aop.scope.ScopedProxyFactoryBean
public class ScopedProxyFactoryBean
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".
ProxyConfig.setProxyTargetClass(boolean)
,
Serialized FormConstructor Summary | |
---|---|
ScopedProxyFactoryBean()
Create a new ScopedProxyFactoryBean instance. |
Method Summary | |
---|---|
java.lang.Object |
getObject()
|
java.lang.Class<?> |
getObjectType()
|
boolean |
isSingleton()
|
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
|
void |
setTargetBeanName(java.lang.String targetBeanName)
Set the name of the bean that is to be scoped. |
Methods inherited from class org.springframework.aop.framework.ProxyConfig |
---|
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ScopedProxyFactoryBean()
Method Detail |
---|
public void setTargetBeanName(java.lang.String targetBeanName)
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
public java.lang.Object getObject()
getObject
in interface org.springframework.beans.factory.FactoryBean<java.lang.Object>
public java.lang.Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<java.lang.Object>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<java.lang.Object>
|
spring-aop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |