Class AbstractScope
- java.lang.Object
-
- com.aspectran.core.component.bean.scope.AbstractScope
-
- All Implemented Interfaces:
Scope
- Direct Known Subclasses:
ApplicationScope
,RequestScope
,SessionScope
public class AbstractScope extends java.lang.Object implements Scope
The Class AbstractScope.- Since:
- 2011. 3. 12.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<BeanRule,InstantiatedBean>
scopedBeanMap
-
Constructor Summary
Constructors Constructor Description AbstractScope(ScopeType scopeType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Destroy all scoped beans in this scope.InstantiatedBean
getInstantiatedBean(BeanRule beanRule)
Returns an instance of the bean that matches the given bean rule.java.util.concurrent.locks.ReadWriteLock
getScopeLock()
Returns the scope lock.void
putInstantiatedBean(BeanRule beanRule, InstantiatedBean instantiatedBean)
Saves an instantiated bean with the given bean rule into the scope.
-
-
-
Field Detail
-
scopedBeanMap
protected final java.util.Map<BeanRule,InstantiatedBean> scopedBeanMap
-
-
Constructor Detail
-
AbstractScope
public AbstractScope(ScopeType scopeType)
-
-
Method Detail
-
getScopeLock
public java.util.concurrent.locks.ReadWriteLock getScopeLock()
Description copied from interface:Scope
Returns the scope lock.- Specified by:
getScopeLock
in interfaceScope
- Returns:
- the scope lock
-
getInstantiatedBean
public InstantiatedBean getInstantiatedBean(BeanRule beanRule)
Description copied from interface:Scope
Returns an instance of the bean that matches the given bean rule.- Specified by:
getInstantiatedBean
in interfaceScope
- Parameters:
beanRule
- the bean rule of the bean to retrieve- Returns:
- an instance of the bean
-
putInstantiatedBean
public void putInstantiatedBean(BeanRule beanRule, InstantiatedBean instantiatedBean)
Description copied from interface:Scope
Saves an instantiated bean with the given bean rule into the scope.- Specified by:
putInstantiatedBean
in interfaceScope
- Parameters:
beanRule
- the bean rule of the bean to saveinstantiatedBean
- an instance of the bean
-
-