|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.integration.eventbus.SpringIntegrationEventBus
public class SpringIntegrationEventBus
EventBus
implementation that delegates all subscription and publishing
requests to a Spring Integration channel
.
setChannel(org.springframework.integration.core.SubscribableChannel)
to set the channel to delegate all
the requests to.
This EventBus will automatically wrap and unwrap events in Messages
and EventListeners
in MessageHandlers
.
This implementation expects the Spring Integration to be configured to handle messages asynchronously.
Constructor Summary | |
---|---|
SpringIntegrationEventBus()
|
Method Summary | |
---|---|
void |
publish(EventMessage... events)
Publish a collection of events on this bus (one, or multiple). |
void |
setChannel(org.springframework.integration.core.SubscribableChannel channel)
Sets the Spring Integration Channel that this event bus should publish events to. |
void |
subscribe(EventListener eventListener)
Subscribe the given eventListener to this bus. |
void |
unsubscribe(EventListener eventListener)
Unsubscribe the given eventListener to this bus. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpringIntegrationEventBus()
Method Detail |
---|
public void publish(EventMessage... events)
EventBus
events
as a single batch and distribute the events as such to
all subscribed EventListeners.
publish
in interface EventBus
events
- The collection of events to publishpublic void unsubscribe(EventListener eventListener)
EventBus
eventListener
to this bus. When unsubscribed, it will no longer receive
events
published to this bus.
unsubscribe
in interface EventBus
eventListener
- The event listener to unsubscribepublic void subscribe(EventListener eventListener)
EventBus
eventListener
to this bus. When subscribed, it will receive all events
published to this bus.
If the given eventListener
is already subscribed, nothing happens.
subscribe
in interface EventBus
eventListener
- The event listener to subscribepublic void setChannel(org.springframework.integration.core.SubscribableChannel channel)
channel
- the channel to publish events to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |