org.axonframework.springmessaging.eventbus
Class SpringMessagingEventBus
java.lang.Object
org.axonframework.springmessaging.eventbus.SpringMessagingEventBus
- All Implemented Interfaces:
- org.axonframework.eventhandling.EventBus
public class SpringMessagingEventBus
- extends Object
- implements org.axonframework.eventhandling.EventBus
EventBus implementation that delegates all subscription and publishing
requests to a Spring Messaging channel.
Use setChannel(org.springframework.messaging.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 Messaging to be configured to handle messages asynchronously.
- Since:
- 2.3.1
- Author:
- Allard Buijze
|
Method Summary |
void |
publish(org.axonframework.domain.EventMessage... events)
|
void |
setChannel(org.springframework.messaging.SubscribableChannel channel)
Sets the Spring Messaging Channel that this event bus should publish events to. |
void |
subscribe(org.axonframework.eventhandling.EventListener eventListener)
|
void |
unsubscribe(org.axonframework.eventhandling.EventListener eventListener)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringMessagingEventBus
public SpringMessagingEventBus()
publish
public void publish(org.axonframework.domain.EventMessage... events)
- Specified by:
publish in interface org.axonframework.eventhandling.EventBus
unsubscribe
public void unsubscribe(org.axonframework.eventhandling.EventListener eventListener)
- Specified by:
unsubscribe in interface org.axonframework.eventhandling.EventBus
subscribe
public void subscribe(org.axonframework.eventhandling.EventListener eventListener)
- Specified by:
subscribe in interface org.axonframework.eventhandling.EventBus
setChannel
public void setChannel(org.springframework.messaging.SubscribableChannel channel)
- Sets the Spring Messaging Channel that this event bus should publish events to.
- Parameters:
channel - the channel to publish events to
Copyright © 2010-2016. All Rights Reserved.