Package com.netflix.genie.web.events
Class GenieEventBusImpl
java.lang.Object
com.netflix.genie.web.events.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 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
ConstructorsConstructorDescriptionGenieEventBusImpl(@NonNull org.springframework.context.event.SimpleApplicationEventMulticaster syncEventMulticaster, @NonNull org.springframework.context.event.SimpleApplicationEventMulticaster asyncEventMulticaster) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddApplicationListener(org.springframework.context.ApplicationListener<?> listener) voidaddApplicationListenerBean(String listenerBeanName) voidmulticastEvent(org.springframework.context.ApplicationEvent event) voidmulticastEvent(org.springframework.context.ApplicationEvent event, org.springframework.core.ResolvableType eventType) voidpublishAsynchronousEvent(@NonNull org.springframework.context.ApplicationEvent event) Publish an event in a different thread than the calling thread.voidpublishSynchronousEvent(@NonNull org.springframework.context.ApplicationEvent event) Publish an event in the same thread as the calling thread.voidvoidremoveApplicationListener(org.springframework.context.ApplicationListener<?> listener) voidremoveApplicationListenerBean(String listenerBeanName) voidremoveApplicationListenerBeans(Predicate<String> predicate) voidremoveApplicationListeners(Predicate<org.springframework.context.ApplicationListener<?>> predicate) voidsetBeanClassLoader(ClassLoader classLoader) voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-
Constructor Details
-
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 useasyncEventMulticaster- The asynchronous task multicaster to use
-
-
Method Details
-
publishSynchronousEvent
public void publishSynchronousEvent(@NonNull @NonNull org.springframework.context.ApplicationEvent event) Publish an event in the same thread as the calling thread.- Specified by:
publishSynchronousEventin interfaceGenieEventBus- 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:
publishAsynchronousEventin interfaceGenieEventBus- Parameters:
event- The event to publish
-
addApplicationListener
public void addApplicationListener(org.springframework.context.ApplicationListener<?> listener) - Specified by:
addApplicationListenerin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
addApplicationListenerBean
- Specified by:
addApplicationListenerBeanin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListener
public void removeApplicationListener(org.springframework.context.ApplicationListener<?> listener) - Specified by:
removeApplicationListenerin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListenerBean
- Specified by:
removeApplicationListenerBeanin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListeners
public void removeApplicationListeners(Predicate<org.springframework.context.ApplicationListener<?>> predicate) - Specified by:
removeApplicationListenersin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListenerBeans
- Specified by:
removeApplicationListenerBeansin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeAllListeners
public void removeAllListeners()- Specified by:
removeAllListenersin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
multicastEvent
public void multicastEvent(org.springframework.context.ApplicationEvent event) - Specified by:
multicastEventin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
multicastEvent
public void multicastEvent(org.springframework.context.ApplicationEvent event, @Nullable org.springframework.core.ResolvableType eventType) - Specified by:
multicastEventin interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
setBeanClassLoader
- Specified by:
setBeanClassLoaderin interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) - Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware
-