public class EventListeningMessageChannelAdapter extends Object implements org.axonframework.eventhandling.EventListener, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanNameAware
EventBus.
Optionally, this adapter can be configured with a filter, which can block or accept messages based on their type.| Constructor and Description |
|---|
EventListeningMessageChannelAdapter(org.axonframework.eventhandling.EventBus eventBus,
org.springframework.messaging.MessageChannel channel)
Initialize an adapter to forward messages from the given
eventBus to the given
channel. |
EventListeningMessageChannelAdapter(org.axonframework.eventhandling.EventBus eventBus,
org.springframework.messaging.MessageChannel channel,
EventFilter filter)
Initialize an adapter to forward messages from the given
eventBus to the given
channel. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Subscribes this event listener to the event bus.
|
void |
handle(org.axonframework.eventhandling.EventMessage event)
If allows by the filter, wraps the given
event in a GenericMessage ands sends it to the
configured MessageChannel. |
void |
setBeanName(String name) |
public EventListeningMessageChannelAdapter(org.axonframework.eventhandling.EventBus eventBus,
org.springframework.messaging.MessageChannel channel)
eventBus to the given
channel.
Messages are not filtered; all messages are forwarded to the MessageChanneleventBus - The event bus to subscribe to.channel - The channel to send event messages to.public EventListeningMessageChannelAdapter(org.axonframework.eventhandling.EventBus eventBus,
org.springframework.messaging.MessageChannel channel,
EventFilter filter)
eventBus to the given
channel.
Messages are filtered using the given filtereventBus - The event bus to subscribe to.channel - The channel to send event messages to.filter - The filter that indicates which messages to forward.public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic void handle(org.axonframework.eventhandling.EventMessage event)
event in a GenericMessage ands sends it to the
configured MessageChannel.handle in interface org.axonframework.eventhandling.EventListenerevent - the event to handlepublic void setBeanName(String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwareCopyright © 2010–2016. All rights reserved.