org.springframework.beans.factory.config

Class CustomScopeConfigurer

  • java.lang.Object
    • org.springframework.beans.factory.config.CustomScopeConfigurer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addScope(java.lang.String scopeName, Scope scope)
      Add the given scope to this configurer's map of scopes.
      int getOrder()
      Get the order value of this object.
      void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
      Modify the application context's internal bean factory after its standard initialization.
      void setBeanClassLoader(java.lang.ClassLoader beanClassLoader)
      Callback that supplies the bean class loader to a bean instance.
      void setOrder(int order) 
      void setScopes(java.util.Map<java.lang.String,java.lang.Object> scopes)
      Specify the custom scopes that are to be registered.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CustomScopeConfigurer

        public CustomScopeConfigurer()
    • Method Detail

      • setScopes

        public void setScopes(java.util.Map<java.lang.String,java.lang.Object> scopes)
        Specify the custom scopes that are to be registered.

        The keys indicate the scope names (of type String); each value is expected to be the corresponding custom Scope instance or class name.

      • addScope

        public void addScope(java.lang.String scopeName,
                             Scope scope)
        Add the given scope to this configurer's map of scopes.
        Parameters:
        scopeName - the name of the scope
        scope - the scope implementation
        Since:
        4.1.1
      • setOrder

        public void setOrder(int order)
      • getOrder

        public int getOrder()
        Description copied from interface: Ordered
        Get the order value of this object.

        Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet load-on-startup values).

        Same order values will result in arbitrary sort positions for the affected objects.

        Specified by:
        getOrder in interface Ordered
        Returns:
        the order value
        See Also:
        Ordered.HIGHEST_PRECEDENCE, Ordered.LOWEST_PRECEDENCE
      • postProcessBeanFactory

        public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
                                    throws BeansException
        Description copied from interface: BeanFactoryPostProcessor
        Modify the application context's internal bean factory after its standard initialization. All bean definitions will have been loaded, but no beans will have been instantiated yet. This allows for overriding or adding properties even to eager-initializing beans.
        Specified by:
        postProcessBeanFactory in interface BeanFactoryPostProcessor
        Parameters:
        beanFactory - the bean factory used by the application context
        Throws:
        BeansException - in case of errors