public class ScopedProxyManager
extends java.lang.Object
Mixed scopes are handled using smart factory/proxy-wrapper singletons instead of 'smaller' scoped beans. On each method call of wrapped factory, smaller scoped bean will be looked up and that instance will be used for passing by the method call.
Manager also has to determine if scope combination is candidate for mixed scopes.
Modifier and Type | Field and Description |
---|---|
protected ProxyAspect |
aspect |
protected java.util.Map<java.lang.String,java.lang.Object> |
proxies |
protected TypeCache<java.lang.Class> |
proxyClasses |
Constructor and Description |
---|
ScopedProxyManager() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
createMixingMessage(BeanDefinition targetBeanDefinition,
BeanDefinition refBeanDefinition)
Creates mixed scope message.
|
protected java.lang.Object |
createScopedProxyBean(PetiteContainer petiteContainer,
BeanDefinition refBeanDefinition)
Creates scoped proxy bean for given bean definition.
|
java.lang.Object |
lookupValue(PetiteContainer petiteContainer,
BeanDefinition targetBeanDefinition,
BeanDefinition refBeanDefinition)
Returns scoped proxy bean if injection scopes are mixed on some injection point.
|
protected ProxyAspect aspect
protected TypeCache<java.lang.Class> proxyClasses
protected java.util.Map<java.lang.String,java.lang.Object> proxies
public java.lang.Object lookupValue(PetiteContainer petiteContainer, BeanDefinition targetBeanDefinition, BeanDefinition refBeanDefinition)
null
if mixing scopes is not detected.protected java.lang.String createMixingMessage(BeanDefinition targetBeanDefinition, BeanDefinition refBeanDefinition)
protected java.lang.Object createScopedProxyBean(PetiteContainer petiteContainer, BeanDefinition refBeanDefinition)
Copyright © 2003-present Jodd Team