Java Code Examples for org.vaadin.spring.events.EventBus#UIEventBus

The following examples show how to use org.vaadin.spring.events.EventBus#UIEventBus . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractNotificationView.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Constructor.
 * 
 * @param eventBus
 *            the ui event bus
 * @param notificationUnreadButton
 *            the notificationUnreadButton
 */
public AbstractNotificationView(final EventBus.UIEventBus eventBus,
        final NotificationUnreadButton notificationUnreadButton) {
    this.eventBus = eventBus;
    this.notificationUnreadButton = notificationUnreadButton;
    this.viewUnreadNotifcations = new AtomicInteger(0);
    skipUiEventsCache = CacheBuilder.newBuilder().expireAfterAccess(10, SECONDS).build();
    if (doSubscribeToEventBus()) {
        eventBus.subscribe(this);
    }
}
 
Example 2
Source File: ScopedEventBusIntegrationTest.java    From vaadin4spring with Apache License 2.0 5 votes vote down vote up
@Test
void testDifferentUIReturnsDifferentUIEventBus() {
    EventBus.UIEventBus uiBus = applicationContext.getBean(EventBus.UIEventBus.class);
    UI.setCurrent(createMockUI());
    EventBus.UIEventBus uiBus2 = applicationContext.getBean(EventBus.UIEventBus.class);
    assertNotEquals(uiBus, uiBus2, "Different UIs should return different UIEventBuses");
}
 
Example 3
Source File: AbstractTagLayout.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
protected EventBus.UIEventBus getEventBus() {
    return eventBus;
}
 
Example 4
Source File: TargetBulkUpdateWindowLayout.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * @return the eventBus
 */
public EventBus.UIEventBus getEventBus() {
    return eventBus;
}
 
Example 5
Source File: AbstractFilterButtons.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
protected EventBus.UIEventBus getEventBus() {
    return eventBus;
}
 
Example 6
Source File: AbstractFilterHeader.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
protected EventBus.UIEventBus getEventBus() {
    return eventBus;
}
 
Example 7
Source File: AbstractGridComponentLayout.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
protected EventBus.UIEventBus getEventBus() {
    return eventBus;
}
 
Example 8
Source File: AbstractTable.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
protected EventBus.UIEventBus getEventBus() {
    return eventBus;
}
 
Example 9
Source File: AbstractNotificationView.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
public EventBus.UIEventBus getEventBus() {
    return eventBus;
}
 
Example 10
Source File: EventBusConfiguration.java    From vaadin4spring with Apache License 2.0 4 votes vote down vote up
@Bean
@Scope(value = VaadinUIScope.VAADIN_UI_SCOPE_NAME, proxyMode = ScopedProxyMode.INTERFACES)
@EventBusProxy
EventBus.UIEventBus proxiedUiEventBus() {
    return uiEventBus();
}
 
Example 11
Source File: EventBusConfiguration.java    From vaadin4spring with Apache License 2.0 4 votes vote down vote up
@Bean
@Scope(value = VaadinUIScope.VAADIN_UI_SCOPE_NAME, proxyMode = ScopedProxyMode.NO)
@Primary
EventBus.UIEventBus uiEventBus() {
    return new ScopedEventBus.DefaultUIEventBus(sessionEventBus());
}
 
Example 12
Source File: ScopedEventBusIntegrationTest.java    From vaadin4spring with Apache License 2.0 4 votes vote down vote up
@Test
void testSameUIReturnsSameUIEventBus() {
    EventBus.UIEventBus uiBus = applicationContext.getBean(EventBus.UIEventBus.class);
    EventBus.UIEventBus uiBus2 = applicationContext.getBean(EventBus.UIEventBus.class);
    assertEquals(uiBus, uiBus2, "Same UI should return same UIEventBus");
}
 
Example 13
Source File: SoftwareModuleDetailsTable.java    From hawkbit with Eclipse Public License 1.0 3 votes vote down vote up
/**
 * Initialize software module table- to be displayed in details layout.
 * 
 * @param i18n
 *            I18N
 * @param isUnassignSoftModAllowed
 *            boolean flag to check for unassign functionality allowed for the
 *            view.
 * @param distributionSetManagement
 *            DistributionSetManagement
 * @param permissionChecker
 *            SpPermissionChecker
 * @param eventBus
 *            SessionEventBus
 * @param manageDistUIState
 *            ManageDistUIState
 * @param uiNotification
 *            UINotification for displaying error and success notifications
 */
public SoftwareModuleDetailsTable(final VaadinMessageSource i18n, final boolean isUnassignSoftModAllowed,
        final SpPermissionChecker permissionChecker, final DistributionSetManagement distributionSetManagement,
        final EventBus.UIEventBus eventBus, final ManageDistUIState manageDistUIState,
        final UINotification uiNotification) {
    this.i18n = i18n;
    this.isUnassignSoftModAllowed = isUnassignSoftModAllowed;
    this.permissionChecker = permissionChecker;
    this.distributionSetManagement = distributionSetManagement;
    this.manageDistUIState = manageDistUIState;
    this.eventBus = eventBus;
    this.uiNotification = uiNotification;
    createSwModuleTable();
}