Class GenieEventBusImpl

  • All Implemented Interfaces:
    GenieEventBus, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.event.ApplicationEventMulticaster

    public class GenieEventBusImpl
    extends java.lang.Object
    implements GenieEventBus, org.springframework.context.event.ApplicationEventMulticaster, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware
    An event bus implementation for the Genie application to use.
    Since:
    3.1.2
    • Constructor Summary

      Constructors 
      Constructor Description
      GenieEventBusImpl​(@NonNull org.springframework.context.event.SimpleApplicationEventMulticaster syncEventMulticaster, @NonNull org.springframework.context.event.SimpleApplicationEventMulticaster asyncEventMulticaster)
      Constructor.
    • Constructor Detail

      • GenieEventBusImpl

        public GenieEventBusImpl​(@NonNull
                                 @NonNull org.springframework.context.event.SimpleApplicationEventMulticaster syncEventMulticaster,
                                 @NonNull
                                 @NonNull org.springframework.context.event.SimpleApplicationEventMulticaster asyncEventMulticaster)
        Constructor.
        Parameters:
        syncEventMulticaster - The synchronous task multicaster to use
        asyncEventMulticaster - The asynchronous task multicaster to use
    • Method Detail

      • publishSynchronousEvent

        public void publishSynchronousEvent​(@NonNull
                                            @NonNull org.springframework.context.ApplicationEvent event)
        Publish an event in the same thread as the calling thread.
        Specified by:
        publishSynchronousEvent in interface GenieEventBus
        Parameters:
        event - The event to publish
      • publishAsynchronousEvent

        public void publishAsynchronousEvent​(@NonNull
                                             @NonNull org.springframework.context.ApplicationEvent event)
        Publish an event in a different thread than the calling thread.
        Specified by:
        publishAsynchronousEvent in interface GenieEventBus
        Parameters:
        event - The event to publish
      • addApplicationListener

        public void addApplicationListener​(org.springframework.context.ApplicationListener<?> listener)
        Specified by:
        addApplicationListener in interface org.springframework.context.event.ApplicationEventMulticaster
      • addApplicationListenerBean

        public void addApplicationListenerBean​(java.lang.String listenerBeanName)
        Specified by:
        addApplicationListenerBean in interface org.springframework.context.event.ApplicationEventMulticaster
      • removeApplicationListener

        public void removeApplicationListener​(org.springframework.context.ApplicationListener<?> listener)
        Specified by:
        removeApplicationListener in interface org.springframework.context.event.ApplicationEventMulticaster
      • removeApplicationListenerBean

        public void removeApplicationListenerBean​(java.lang.String listenerBeanName)
        Specified by:
        removeApplicationListenerBean in interface org.springframework.context.event.ApplicationEventMulticaster
      • removeApplicationListeners

        public void removeApplicationListeners​(java.util.function.Predicate<org.springframework.context.ApplicationListener<?>> predicate)
        Specified by:
        removeApplicationListeners in interface org.springframework.context.event.ApplicationEventMulticaster
      • removeApplicationListenerBeans

        public void removeApplicationListenerBeans​(java.util.function.Predicate<java.lang.String> predicate)
        Specified by:
        removeApplicationListenerBeans in interface org.springframework.context.event.ApplicationEventMulticaster
      • removeAllListeners

        public void removeAllListeners()
        Specified by:
        removeAllListeners in interface org.springframework.context.event.ApplicationEventMulticaster
      • multicastEvent

        public void multicastEvent​(org.springframework.context.ApplicationEvent event)
        Specified by:
        multicastEvent in interface org.springframework.context.event.ApplicationEventMulticaster
      • multicastEvent

        public void multicastEvent​(org.springframework.context.ApplicationEvent event,
                                   @Nullable
                                   org.springframework.core.ResolvableType eventType)
        Specified by:
        multicastEvent in interface org.springframework.context.event.ApplicationEventMulticaster
      • setBeanClassLoader

        public void setBeanClassLoader​(java.lang.ClassLoader classLoader)
        Specified by:
        setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware
      • setBeanFactory

        public void setBeanFactory​(org.springframework.beans.factory.BeanFactory beanFactory)
        Specified by:
        setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware