Class AbstractScope
java.lang.Object
com.aspectran.core.component.bean.scope.AbstractScope
- All Implemented Interfaces:
Scope
,NonPersistent
- Direct Known Subclasses:
RequestScope
,SessionScope
,SingletonScope
Base class for
Scope
implementations.- Since:
- 2011. 3. 12.
-
Constructor Summary
Constructors -
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.protected Map<BeanRule,
BeanInstance> void
putBeanInstance
(Activity activity, BeanRule beanRule, BeanInstance beanInstance) Saves an instantiated bean with the given bean rule into the scope.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aspectran.core.component.bean.scope.Scope
getScopeLock, getScopeType
-
Constructor Details
-
AbstractScope
public AbstractScope()
-
-
Method Details
-
getScopedBeanInstances
-
getBeanInstance
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
Description copied from interface:Scope
Saves an instantiated bean with the given bean rule into the scope.- Specified by:
putBeanInstance
in interfaceScope
- Parameters:
activity
- the current activitybeanRule
- the bean rule of the bean to savebeanInstance
- an instance of the bean
-
getBeanRuleByInstance
Description copied from interface:Scope
Returns the bean rule corresponding to the bean object.- Specified by:
getBeanRuleByInstance
in interfaceScope
- Parameters:
bean
- the bean object to find- Returns:
- the bean rule
-
containsBeanRule
Description copied from interface:Scope
Returns whether the bean rule exists in this scope.- Specified by:
containsBeanRule
in interfaceScope
- Parameters:
beanRule
- the bean rule to find- Returns:
true
if the bean rule exists in this scope,false
otherwise
-
destroy
Description copied from interface:Scope
Destroy the bean that matches the given object in this scope. -
destroy
public void destroy()Description copied from interface:Scope
Destroy all scoped beans in this scope.
-