Interface IBeanScopeHandler
-
- All Superinterfaces:
Serializable
public interface IBeanScopeHandler extends Serializable
Handler for the various different bean scopes, such as session scoped beans or view scoped beans.- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Object
get(String name)
default Annotation
getAnnotation(Class<?> beanClass)
default org.apache.commons.lang3.tuple.Pair<Class<? extends Annotation>,? extends Annotation>
getAnnotationAndScope(Class<?> beanClass)
Class<? extends Annotation>
getPreferredScope()
Set<Class<? extends Annotation>>
getScopes()
void
put(String name, Object value)
Object
remove(String name)
-
-
-
Method Detail
-
getScopes
Set<Class<? extends Annotation>> getScopes()
- Returns:
- The scope of this handler, one of
RequestScoped
,ViewScoped
,SessionScoped
, orApplicationScoped
-
put
void put(String name, Object value)
- Parameters:
name
- Name of the propertyvalue
- Value to set
-
get
Object get(String name)
- Parameters:
name
- Name of the property- Returns:
- Value associated with the name, or
null
-
remove
Object remove(String name)
- Parameters:
name
- Name of the property to remove- Returns:
- Previous value associated with the name, or
null
-
getAnnotation
default Annotation getAnnotation(Class<?> beanClass)
- Parameters:
beanClass
- Bean class for which to get the scope.- Returns:
- The scope annotation for this scope type.
-
getPreferredScope
Class<? extends Annotation> getPreferredScope()
- Returns:
- The preferred scope.
-
getAnnotationAndScope
default org.apache.commons.lang3.tuple.Pair<Class<? extends Annotation>,? extends Annotation> getAnnotationAndScope(Class<?> beanClass)
- Parameters:
beanClass
- Bean class for which to get the scope.- Returns:
- The scope annotation for this scope type, and the class of the .
-
-