Interface Scope
-
- All Known Implementing Classes:
AbstractScope
,HttpSessionAdapter.HttpSessionScope
,RequestScope
,SessionScope
,SingletonScope
public interface Scope
The Interface Scope.- Since:
- 2011. 3. 12.
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
getScopeLock
java.util.concurrent.locks.ReadWriteLock getScopeLock()
Returns the scope lock.- Returns:
- the scope lock
-
getBeanInstance
BeanInstance getBeanInstance(BeanRule beanRule)
Returns an instance of the bean that matches the given bean rule.- Parameters:
beanRule
- the bean rule of the bean to retrieve- Returns:
- an instance of the bean
-
putBeanInstance
void putBeanInstance(BeanRule beanRule, BeanInstance beanInstance)
Saves an instantiated bean with the given bean rule into the scope.- Parameters:
beanRule
- the bean rule of the bean to savebeanInstance
- an instance of the bean
-
getBeanRule
BeanRule getBeanRule(java.lang.Object bean)
-
containsBeanRule
boolean containsBeanRule(BeanRule beanRule)
-
destroy
void destroy(java.lang.Object bean) throws java.lang.Exception
- Throws:
java.lang.Exception
-
destroy
void destroy()
Destroy all scoped beans in this scope.
-
-