Class DefaultCockpitEventQueue

    • Constructor Detail

      • DefaultCockpitEventQueue

        public DefaultCockpitEventQueue()
    • Method Detail

      • addEventToAggregatedEventsForWidgets

        protected void addEventToAggregatedEventsForWidgets​(CockpitEvent event,
                                                            java.util.List<ListenerInfo> listenerWidgetsToNotify)
      • findWidgetListenersToNotify

        protected java.util.List<ListenerInfo> findWidgetListenersToNotify​(CockpitEvent event)
      • getCurrentScopeContext

        protected ScopeContext getCurrentScopeContext()
      • fetchEvents

        public java.util.List<CockpitEvent> fetchEvents​(java.lang.String widgetID)
        Description copied from interface: CockpitEventQueue
        Returns all events available for the specified widget and removes them from the queue.
        Specified by:
        fetchEvents in interface CockpitEventQueue
        Parameters:
        widgetID - The widget for which the events should be fetched.
        Returns:
        The events being published since the last call of this method or an empty list, if the widget has not been registered.
      • registerListener

        public void registerListener​(java.lang.String widgetID,
                                     java.lang.String eventName,
                                     java.lang.String scope)
        Description copied from interface: CockpitEventQueue
        Registers the widget as a listener for the specified event.
        Specified by:
        registerListener in interface CockpitEventQueue
        Parameters:
        widgetID - A string that represents the widget.
        eventName - A string that defines the event.
      • findListenersByName

        protected java.util.Set<ListenerInfo> findListenersByName​(java.lang.String eventName)
      • findEventsForWidgets

        protected java.util.Set<CockpitEvent> findEventsForWidgets​(java.lang.String widgetId)
      • removeListener

        public void removeListener​(java.lang.String widgetID)
        This implementation is async and therefore the calling side should not rely on it being effective immediately.
        Remove the specified widget from the set of listeners. If the widget is not registered, this method does nothing.
        Specified by:
        removeListener in interface CockpitEventQueue
        Parameters:
        widgetID - The widget to remove from the listeners.
      • setCockpitUserService

        public void setCockpitUserService​(CockpitUserService cockpitUserService)