Interface Scope
- All Superinterfaces:
NonPersistent
- All Known Implementing Classes:
AbstractScope
,HttpSessionScope
,RequestScope
,SessionScope
,SingletonScope
The Interface Scope.
- Since:
- 2011. 3. 12.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsBeanRule
(BeanRule beanRule) Returns whether the bean rule exists in this scope.void
destroy()
Destroy all scoped beans in this scope.void
Destroy the bean that matches the given object in this scope.getBeanInstance
(BeanRule beanRule) Returns an instance of the bean that matches the given bean rule.getBeanRuleByInstance
(Object bean) Returns the bean rule corresponding to the bean object.Returns the lock of this scope.Returns the type of this scope.void
putBeanInstance
(Activity activity, BeanRule beanRule, BeanInstance beanInstance) Saves an instantiated bean with the given bean rule into the scope.
-
Method Details
-
getScopeType
ScopeType getScopeType()Returns the type of this scope.- Returns:
- the scope type
-
getScopeLock
ReadWriteLock getScopeLock()Returns the lock of this scope.- Returns:
- the scope lock
-
getBeanInstance
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
Saves an instantiated bean with the given bean rule into the scope.- Parameters:
activity
- the current activitybeanRule
- the bean rule of the bean to savebeanInstance
- an instance of the bean
-
getBeanRuleByInstance
Returns the bean rule corresponding to the bean object.- Parameters:
bean
- the bean object to find- Returns:
- the bean rule
-
containsBeanRule
Returns whether the bean rule exists in this scope.- Parameters:
beanRule
- the bean rule to find- Returns:
true
if the bean rule exists in this scope,false
otherwise
-
destroy
Destroy the bean that matches the given object in this scope.- Parameters:
bean
- the bean object to destroy- Throws:
Exception
- if the bean cannot be destroyed
-
destroy
void destroy()Destroy all scoped beans in this scope.
-