public class ApplicationContextEventPublisher extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
SubscribableMessageSource as Spring ApplicationEvent to
the ApplicationContext.| Constructor and Description |
|---|
ApplicationContextEventPublisher(SubscribableMessageSource<? extends EventMessage<?>> messageSource)
Initialize the publisher to forward events received from the given
messageSource to the application
context that this bean is part of. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected org.springframework.context.ApplicationEvent |
convert(EventMessage<?> eventMessage)
Converts the given Axon
eventMessage to a Spring ApplicationEvent. |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public ApplicationContextEventPublisher(SubscribableMessageSource<? extends EventMessage<?>> messageSource)
messageSource to the application
context that this bean is part of.messageSource - The source to subscribe to.public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionprotected org.springframework.context.ApplicationEvent convert(EventMessage<?> eventMessage)
eventMessage to a Spring ApplicationEvent. This method may be overridden to
change the translation.
The default implementation creates a PayloadApplicationEvent with the Message's payload.
If this method returns null, no message is published
eventMessage - The EventMessage to transformpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanCopyright © 2010–2023. All rights reserved.