public class EventListeningMessageChannelAdapter extends Object implements EventListener, org.springframework.beans.factory.InitializingBean
EventBus.
Optionally, this adapter can be configured with a filter, which can block or accept messages based on their type.| Constructor and Description |
|---|
EventListeningMessageChannelAdapter(EventBus eventBus,
org.springframework.integration.MessageChannel channel)
Initialize an adapter to forward messages from the given
eventBus to the given
channel. |
EventListeningMessageChannelAdapter(EventBus eventBus,
org.springframework.integration.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(EventMessage event)
If allows by the filter, wraps the given
event in a GenericMessage ands sends it to the
configured MessageChannel. |
public EventListeningMessageChannelAdapter(EventBus eventBus, org.springframework.integration.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(EventBus eventBus, org.springframework.integration.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(EventMessage event)
event in a GenericMessage ands sends it to the
configured MessageChannel.handle in interface EventListenerevent - the event to handleCopyright © 2010-2014. All Rights Reserved.