There are three event scopes, and therefore three event bus types:
The event buses are chained in the following way:
The primary {@code EventBus} implementation is always UI-scoped and can be injected into your UI classes like this: @Autowired EventBus myUIScopedEventBus;
With this implementation, you can subscribe to and publish events of all scopes (see {@link #publish(EventScope,Object,Object)}).
However, if you want to inject any of the other event buses, you have to use the {@link org.vaadin.spring.events.EventBusScope} qualifier. For example, the following code will inject the session event bus: @Autowired @EventBusScope(EventScope.SESSION) EventBus myUIScopedEventBus;
@author Petter Holmström (petter@vaadin.com)
|
|