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 TypeMethodDescriptionvoid
addApplicationListener
(org.springframework.context.ApplicationListener<?> listener) void
addApplicationListenerBean
(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
void
removeApplicationListener
(org.springframework.context.ApplicationListener<?> listener) void
removeApplicationListenerBean
(String listenerBeanName) void
removeApplicationListenerBeans
(Predicate<String> predicate) void
removeApplicationListeners
(Predicate<org.springframework.context.ApplicationListener<?>> predicate) void
setBeanClassLoader
(ClassLoader classLoader) void
setBeanFactory
(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:
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
- 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
- Specified by:
removeApplicationListenerBean
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListeners
public void removeApplicationListeners(Predicate<org.springframework.context.ApplicationListener<?>> predicate) - Specified by:
removeApplicationListeners
in interfaceorg.springframework.context.event.ApplicationEventMulticaster
-
removeApplicationListenerBeans
- 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
- 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
-