|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjodd.petite.ScopedProxyManager
public class ScopedProxyManager
Manager for mixing scopes. 'Mixed scopes' is the situation when 'smaller' scope is injected into the 'bigger' scope. Trivial example is when prototype scoped bean is injected into singleton bean.
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.
| Field Summary | |
|---|---|
protected ProxyAspect |
aspect
|
protected Map<String,Object> |
proxies
|
protected Map<Class,Class> |
proxyClasses
|
| Constructor Summary | |
|---|---|
ScopedProxyManager()
|
|
| Method Summary | |
|---|---|
protected String |
createMixingMessage(BeanDefinition targetBeanDefinition,
BeanDefinition refBeanDefinition)
Creates mixed scope message. |
protected Object |
createScopedProxyBean(PetiteContainer petiteContainer,
BeanDefinition refBeanDefinition)
Creates scoped proxy bean for given bean definition. |
Object |
lookupValue(PetiteContainer petiteContainer,
BeanDefinition targetBeanDefinition,
BeanDefinition refBeanDefinition)
Returns scoped proxy bean if injection scopes are mixed on some injection point. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ProxyAspect aspect
protected Map<Class,Class> proxyClasses
protected Map<String,Object> proxies
| Constructor Detail |
|---|
public ScopedProxyManager()
| Method Detail |
|---|
public Object lookupValue(PetiteContainer petiteContainer,
BeanDefinition targetBeanDefinition,
BeanDefinition refBeanDefinition)
null if mixing scopes is not detected.
protected String createMixingMessage(BeanDefinition targetBeanDefinition,
BeanDefinition refBeanDefinition)
protected Object createScopedProxyBean(PetiteContainer petiteContainer,
BeanDefinition refBeanDefinition)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||