|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.springmessaging.adapter.EventListeningMessageChannelAdapter
public class EventListeningMessageChannelAdapter
Adapter class that sends Events from an event bus to a Spring Messaging Message Channel. All events are wrapped in
GenericMessage instances. The adapter automatically subscribes itself to the provided EventBus
.
Constructor Summary | |
---|---|
EventListeningMessageChannelAdapter(EventBus eventBus,
org.springframework.messaging.MessageChannel channel)
Initialize an adapter to forward messages from the given eventBus to the given
channel . |
|
EventListeningMessageChannelAdapter(EventBus eventBus,
org.springframework.messaging.MessageChannel channel,
EventFilter filter)
Initialize an adapter to forward messages from the given eventBus to the given
channel . |
Method Summary | |
---|---|
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventListeningMessageChannelAdapter(EventBus eventBus, org.springframework.messaging.MessageChannel channel)
eventBus
to the given
channel
.
Messages are not filtered; all messages are forwarded to the MessageChannel
eventBus
- The event bus to subscribe to.channel
- The channel to send event messages to.public EventListeningMessageChannelAdapter(EventBus eventBus, org.springframework.messaging.MessageChannel channel, EventFilter filter)
eventBus
to the given
channel
.
Messages are filtered using the given filter
eventBus
- The event bus to subscribe to.channel
- The channel to send event messages to.filter
- The filter that indicates which messages to forward.Method Detail |
---|
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public void handle(EventMessage event)
event
in a GenericMessage
ands sends it to the
configured MessageChannel
.
handle
in interface EventListener
event
- the event to handle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |