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 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addApplicationListener(org.springframework.context.ApplicationListener<?> listener)
void
addApplicationListenerBean(java.lang.String listenerBeanName)
void
multicastEvent(org.springframework.context.ApplicationEvent event)
void
multicastEvent(org.springframework.context.ApplicationEvent event, org.springframework.core.ResolvableType eventType)
void
publishAsynchronousEvent(@NonNull org.springframework.context.ApplicationEvent event)
Publish an event in a different thread than the calling thread.void
publishSynchronousEvent(@NonNull org.springframework.context.ApplicationEvent event)
Publish an event in the same thread as the calling thread.void
removeAllListeners()
void
removeApplicationListener(org.springframework.context.ApplicationListener<?> listener)
void
removeApplicationListenerBean(java.lang.String listenerBeanName)
void
removeApplicationListenerBeans(java.util.function.Predicate<java.lang.String> predicate)
void
removeApplicationListeners(java.util.function.Predicate<org.springframework.context.ApplicationListener<?>> predicate)
void
setBeanClassLoader(java.lang.ClassLoader classLoader)
void
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
-
-
-
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 useasyncEventMulticaster
- 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 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:
publishAsynchronousEvent
in interfaceGenieEventBus
- Parameters:
event
- The event to publish
-
addApplicationListener
public void addApplicationListener(org.springframework.context.ApplicationListener<?> listener)
- Specified by:
addApplicationListener
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
addApplicationListenerBean
public void addApplicationListenerBean(java.lang.String listenerBeanName)
- Specified by:
addApplicationListenerBean
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListener
public void removeApplicationListener(org.springframework.context.ApplicationListener<?> listener)
- Specified by:
removeApplicationListener
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListenerBean
public void removeApplicationListenerBean(java.lang.String listenerBeanName)
- Specified by:
removeApplicationListenerBean
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListeners
public void removeApplicationListeners(java.util.function.Predicate<org.springframework.context.ApplicationListener<?>> predicate)
- Specified by:
removeApplicationListeners
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListenerBeans
public void removeApplicationListenerBeans(java.util.function.Predicate<java.lang.String> predicate)
- Specified by:
removeApplicationListenerBeans
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeAllListeners
public void removeAllListeners()
- Specified by:
removeAllListeners
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
multicastEvent
public void multicastEvent(org.springframework.context.ApplicationEvent event)
- Specified by:
multicastEvent
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
multicastEvent
public void multicastEvent(org.springframework.context.ApplicationEvent event, @Nullable org.springframework.core.ResolvableType eventType)
- Specified by:
multicastEvent
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
setBeanClassLoader
public void setBeanClassLoader(java.lang.ClassLoader classLoader)
- Specified by:
setBeanClassLoader
in interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
- Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
-
-