Class UiEventsManager

java.lang.Object
io.jmix.flowui.sys.event.UiEventsManager

@SpringComponent("flowui_UiEventsMulticaster") @SessionScope public class UiEventsManager extends Object
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.context.ApplicationContext
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    UiEventsManager(org.springframework.context.ApplicationContext applicationContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addApplicationListener(com.vaadin.flow.component.Component component, org.springframework.context.ApplicationListener<?> listener)
    Adds application listener that should be invoked when corresponding application event is fired.
    protected Collection<org.springframework.context.ApplicationListener<?>>
    filterComponentListeners(UiEventsManager.ComponentListeners componentListeners, org.springframework.core.ResolvableType eventType, Class<?> sourceType)
     
    protected void
    invokeListener(org.springframework.context.ApplicationListener listener, org.springframework.context.ApplicationEvent event)
     
    void
    publish(Collection<com.vaadin.flow.component.UI> uis, org.springframework.context.ApplicationEvent event)
    Publishes application event for provided UIs.
    void
    Removes all application listeners for all components.
    void
    removeApplicationListener(org.springframework.context.ApplicationListener<?> listener)
    Removes application listener.
    void
    removeApplicationListeners(com.vaadin.flow.component.Component component)
    Removes all application listeners that have definition in the given component.
    protected org.springframework.core.ResolvableType
    resolveDefaultEventType(org.springframework.context.ApplicationEvent event)
     
    protected Collection<org.springframework.context.ApplicationListener<?>>
    retrieveApplicationListeners(Collection<com.vaadin.flow.component.UI> uis, org.springframework.core.ResolvableType eventType, Class<?> sourceType)
    Retrieves application listeners from UIs that support provided event type.
    protected boolean
    supportsEvent(org.springframework.context.ApplicationListener<?> listener, org.springframework.core.ResolvableType eventType, Class<?> sourceType)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • UiEventsManager

      @Autowired public UiEventsManager(org.springframework.context.ApplicationContext applicationContext)
  • Method Details

    • addApplicationListener

      public void addApplicationListener(com.vaadin.flow.component.Component component, org.springframework.context.ApplicationListener<?> listener)
      Adds application listener that should be invoked when corresponding application event is fired.
      Parameters:
      component - the component that contains listener definition.
      listener - application listener
    • removeApplicationListener

      public void removeApplicationListener(org.springframework.context.ApplicationListener<?> listener)
      Removes application listener.
      Parameters:
      listener - listener to remove
    • removeApplicationListeners

      public void removeApplicationListeners(com.vaadin.flow.component.Component component)
      Removes all application listeners that have definition in the given component.
      Parameters:
      component - component
    • removeAllApplicationListeners

      public void removeAllApplicationListeners()
      Removes all application listeners for all components.
    • publish

      public void publish(Collection<com.vaadin.flow.component.UI> uis, org.springframework.context.ApplicationEvent event)
      Publishes application event for provided UIs. Empty collection of UIs means iterating all existing UIs in the current session.
      Parameters:
      uis - collection of UIs
      event - event to publish
    • invokeListener

      protected void invokeListener(org.springframework.context.ApplicationListener listener, org.springframework.context.ApplicationEvent event)
    • resolveDefaultEventType

      protected org.springframework.core.ResolvableType resolveDefaultEventType(org.springframework.context.ApplicationEvent event)
    • retrieveApplicationListeners

      protected Collection<org.springframework.context.ApplicationListener<?>> retrieveApplicationListeners(Collection<com.vaadin.flow.component.UI> uis, org.springframework.core.ResolvableType eventType, @Nullable Class<?> sourceType)
      Retrieves application listeners from UIs that support provided event type. Empty collection of UIs means iterating all existing UIs in the current session.
      Parameters:
      uis - collection of UIs
      eventType - type of event
      sourceType - type of source
      Returns:
      collection of application listeners that supports provided event type
    • filterComponentListeners

      protected Collection<org.springframework.context.ApplicationListener<?>> filterComponentListeners(UiEventsManager.ComponentListeners componentListeners, org.springframework.core.ResolvableType eventType, @Nullable Class<?> sourceType)
    • supportsEvent

      protected boolean supportsEvent(org.springframework.context.ApplicationListener<?> listener, org.springframework.core.ResolvableType eventType, @Nullable Class<?> sourceType)