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 Detail

      • getScopes

        Set<Class<? extends Annotation>> getScopes()
        Returns:
        The scope of this handler, one of RequestScoped, ViewScoped, SessionScoped, or ApplicationScoped
      • put

        void put​(String name,
                 Object value)
        Parameters:
        name - Name of the property
        value - 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 .