Class AbstractScope
- java.lang.Object
-
- com.aspectran.core.component.bean.scope.AbstractScope
-
- All Implemented Interfaces:
Scope
- Direct Known Subclasses:
RequestScope
,SessionScope
,SingletonScope
public abstract class AbstractScope extends java.lang.Object implements Scope
The Class AbstractScope.- Since:
- 2011. 3. 12.
-
-
Constructor Summary
Constructors Constructor Description AbstractScope(ScopeType scopeType, boolean needLock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsBeanRule(BeanRule beanRule)
void
destroy()
Destroy all scoped beans in this scope.void
destroy(java.lang.Object bean)
BeanInstance
getBeanInstance(BeanRule beanRule)
Returns an instance of the bean that matches the given bean rule.BeanRule
getBeanRule(java.lang.Object bean)
java.util.concurrent.locks.ReadWriteLock
getScopeLock()
Returns the scope lock.void
putBeanInstance(BeanRule beanRule, BeanInstance beanInstance)
Saves an instantiated bean with the given bean rule into the scope.
-
-
-
Constructor Detail
-
AbstractScope
public AbstractScope(ScopeType scopeType, boolean needLock)
-
-
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
-
getBeanInstance
public BeanInstance getBeanInstance(BeanRule beanRule)
Description copied from interface:Scope
Returns an instance of the bean that matches the given bean rule.- Specified by:
getBeanInstance
in interfaceScope
- Parameters:
beanRule
- the bean rule of the bean to retrieve- Returns:
- an instance of the bean
-
putBeanInstance
public void putBeanInstance(BeanRule beanRule, BeanInstance beanInstance)
Description copied from interface:Scope
Saves an instantiated bean with the given bean rule into the scope.- Specified by:
putBeanInstance
in interfaceScope
- Parameters:
beanRule
- the bean rule of the bean to savebeanInstance
- an instance of the bean
-
getBeanRule
public BeanRule getBeanRule(java.lang.Object bean)
- Specified by:
getBeanRule
in interfaceScope
-
containsBeanRule
public boolean containsBeanRule(BeanRule beanRule)
- Specified by:
containsBeanRule
in interfaceScope
-
destroy
public void destroy(java.lang.Object bean) throws java.lang.Exception
-
-