Class EventListenersFactoryBean

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

    public class EventListenersFactoryBean
    extends org.springframework.beans.factory.config.AbstractFactoryBean
    configuring all the possible event listeners within XML can be cumbersome.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean debugAll  
      • Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void additions()  
      protected void append​(java.lang.String key, java.lang.Object... objs)
      appends the objects to the existing list identified by key.
      protected java.lang.Object createInstance()
      First, adds all default listeners.
      java.lang.Class getObjectType()
      this FactoryBean produces a Map instance for use in LocalSessionFactoryBean.setEventListeners(Map)
      boolean isSingleton()
      being a singleton implies that this FactoryBean will only ever create one instance.
      protected void override​(java.lang.String[] keys, java.lang.Object object)
      calls override for each key
      protected void override​(java.lang.String key, java.lang.Object object)
      first re-initializes the list for key, and then adds object
      protected void overrides()  
      protected void prepend​(java.lang.String key, java.lang.Object... objs)
      adds the objects to the existing list identified by key.
      protected void put​(java.lang.String key, java.lang.Object[] objs)
      replaces the key with the provided objects or an empty list if none provided
      void setDebugAll​(boolean debug)
      for setter injection
      • Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

        afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, setBeanClassLoader, setBeanFactory, setSingleton
      • Methods inherited from class java.lang.Object

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

      • debugAll

        protected boolean debugAll
    • Method Detail

      • getObjectType

        public java.lang.Class getObjectType()
        this FactoryBean produces a Map instance for use in LocalSessionFactoryBean.setEventListeners(Map)
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean
        Specified by:
        getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean
      • isSingleton

        public boolean isSingleton()
        being a singleton implies that this FactoryBean will only ever create one instance.
        Specified by:
        isSingleton in interface org.springframework.beans.factory.FactoryBean
        Overrides:
        isSingleton in class org.springframework.beans.factory.config.AbstractFactoryBean
      • createInstance

        protected java.lang.Object createInstance()
                                           throws java.lang.Exception
        First, adds all default listeners. These are then overwritten.
        Specified by:
        createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean
        Throws:
        java.lang.Exception
      • setDebugAll

        public void setDebugAll​(boolean debug)
        for setter injection
      • overrides

        protected void overrides()
      • additions

        protected void additions()
      • override

        protected void override​(java.lang.String[] keys,
                                java.lang.Object object)
        calls override for each key
      • override

        protected void override​(java.lang.String key,
                                java.lang.Object object)
        first re-initializes the list for key, and then adds object
      • append

        protected void append​(java.lang.String key,
                              java.lang.Object... objs)
        appends the objects to the existing list identified by key. If no list is found, initializes. If there are no objects, just initializes if necessary.
      • prepend

        protected void prepend​(java.lang.String key,
                               java.lang.Object... objs)
        adds the objects to the existing list identified by key. If no list is found, initializes. If there are no objects, just initializes if necessary.
      • put

        protected void put​(java.lang.String key,
                           java.lang.Object[] objs)
        replaces the key with the provided objects or an empty list if none provided