Class SessionScope
java.lang.Object
com.aspectran.core.component.bean.scope.AbstractScope
com.aspectran.core.component.bean.scope.SessionScope
- All Implemented Interfaces:
Scope
,NonPersistent
,SessionBindingListener
,EventListener
- Direct Known Subclasses:
HttpSessionScope
The Class SessionScope.
- Since:
- 2011. 3. 12.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsBeanRule
(BeanRule beanRule) Returns whether the bean rule exists 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.void
valueUnbound
(Session session, String name, Object value) Notifies the object that it is being unbound from a session and identifies the session.Methods inherited from class com.aspectran.core.component.bean.scope.AbstractScope
destroy, destroy, getScopedBeanInstances
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.session.SessionBindingListener
valueBound
-
Field Details
-
SESSION_SCOPE_ATTR_NAME
-
-
Constructor Details
-
SessionScope
public SessionScope()Instantiates a new Session scope.
-
-
Method Details
-
getScopeType
Description copied from interface:Scope
Returns the type of this scope.- Specified by:
getScopeType
in interfaceScope
- Returns:
- the scope type
-
getScopeLock
Description copied from interface:Scope
Returns the lock of this scope.- Specified by:
getScopeLock
in interfaceScope
- Returns:
- the scope lock
-
valueUnbound
Description copied from interface:SessionBindingListener
Notifies the object that it is being unbound from a session and identifies the session.- Specified by:
valueUnbound
in interfaceSessionBindingListener
- Parameters:
session
- the session to which the object is bound or unboundname
- the name with which the object is bound or unboundvalue
- the value of the attribute that has been added, removed or replaced.- See Also:
-
getBeanInstance
Description copied from interface:Scope
Returns an instance of the bean that matches the given bean rule.- Specified by:
getBeanInstance
in interfaceScope
- Overrides:
getBeanInstance
in classAbstractScope
- 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
- Overrides:
putBeanInstance
in classAbstractScope
- 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
- Overrides:
getBeanRuleByInstance
in classAbstractScope
- 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
- Overrides:
containsBeanRule
in classAbstractScope
- Parameters:
beanRule
- the bean rule to find- Returns:
true
if the bean rule exists in this scope,false
otherwise
-