Class DelegatingApplicationListener

  • All Implemented Interfaces:
    java.util.EventListener, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>

    public final class DelegatingApplicationListener
    extends java.lang.Object
    implements org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
    Used for delegating to a number of SmartApplicationListener instances. This is useful when needing to register an SmartApplicationListener with the ApplicationContext programmatically.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addListener​(org.springframework.context.event.SmartApplicationListener smartApplicationListener)
      Adds a new SmartApplicationListener to use.
      void onApplicationEvent​(org.springframework.context.ApplicationEvent event)  
      • Methods inherited from class java.lang.Object

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

      • DelegatingApplicationListener

        public DelegatingApplicationListener()
    • Method Detail

      • onApplicationEvent

        public void onApplicationEvent​(org.springframework.context.ApplicationEvent event)
        Specified by:
        onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
      • addListener

        public void addListener​(org.springframework.context.event.SmartApplicationListener smartApplicationListener)
        Adds a new SmartApplicationListener to use.
        Parameters:
        smartApplicationListener - the SmartApplicationListener to use. Cannot be null.