Class AbstractScope
- java.lang.Object
-
- com.aspectran.core.component.bean.scope.AbstractScope
-
- All Implemented Interfaces:
Scope,NonPersistent
- Direct Known Subclasses:
RequestScope,SessionScope,SingletonScope
public abstract class AbstractScope extends java.lang.Object implements Scope
Base class forScopeimplementations.- Since:
- 2011. 3. 12.
-
-
Constructor Summary
Constructors Constructor Description AbstractScope()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsBeanRule(BeanRule beanRule)Returns whether the bean rule exists in this scope.voiddestroy()Destroy all scoped beans in this scope.voiddestroy(java.lang.Object bean)Destroy the bean that matches the given object in this scope.BeanInstancegetBeanInstance(BeanRule beanRule)Returns an instance of the bean that matches the given bean rule.BeanRulegetBeanRule(java.lang.Object bean)Returns the bean rule corresponding to the bean object.voidputBeanInstance(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
-
-
-
-
Method Detail
-
getBeanInstance
public BeanInstance getBeanInstance(BeanRule beanRule)
Description copied from interface:ScopeReturns an instance of the bean that matches the given bean rule.- Specified by:
getBeanInstancein interfaceScope- Parameters:
beanRule- the bean rule of the bean to retrieve- Returns:
- an instance of the bean
-
putBeanInstance
public void putBeanInstance(Activity activity, BeanRule beanRule, BeanInstance beanInstance)
Description copied from interface:ScopeSaves an instantiated bean with the given bean rule into the scope.- Specified by:
putBeanInstancein interfaceScope- Parameters:
activity- the current activitybeanRule- the bean rule of the bean to savebeanInstance- an instance of the bean
-
getBeanRule
public BeanRule getBeanRule(java.lang.Object bean)
Description copied from interface:ScopeReturns the bean rule corresponding to the bean object.- Specified by:
getBeanRulein interfaceScope- Parameters:
bean- the bean object to find- Returns:
- the bean rule
-
containsBeanRule
public boolean containsBeanRule(BeanRule beanRule)
Description copied from interface:ScopeReturns whether the bean rule exists in this scope.- Specified by:
containsBeanRulein interfaceScope- Parameters:
beanRule- the bean rule to find- Returns:
trueif the bean rule exists in this scope,falseotherwise
-
destroy
public void destroy(java.lang.Object bean) throws java.lang.ExceptionDescription copied from interface:ScopeDestroy the bean that matches the given object in this scope.
-
-