Package io.jmix.flowui.sys.event
Class UiEventsManager
java.lang.Object
io.jmix.flowui.sys.event.UiEventsManager
@SpringComponent("flowui_UiEventsMulticaster")
@SessionScope
public class UiEventsManager
extends Object
- 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected Set<UiEventsManager.ComponentListeners> - 
Constructor Summary
ConstructorsConstructorDescriptionUiEventsManager(org.springframework.context.ApplicationContext applicationContext)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddApplicationListener(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 voidinvokeListener(org.springframework.context.ApplicationListener listener, org.springframework.context.ApplicationEvent event) voidpublish(Collection<com.vaadin.flow.component.UI> uis, org.springframework.context.ApplicationEvent event) Publishes application event for provided UIs.voidRemoves all application listeners for all components.voidremoveApplicationListener(org.springframework.context.ApplicationListener<?> listener) Removes application listener.voidremoveApplicationListeners(com.vaadin.flow.component.Component component) Removes all application listeners that have definition in the given component.protected org.springframework.core.ResolvableTyperesolveDefaultEventType(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 booleansupportsEvent(org.springframework.context.ApplicationListener<?> listener, org.springframework.core.ResolvableType eventType, Class<?> sourceType)  
- 
Field Details
- 
applicationContext
protected org.springframework.context.ApplicationContext applicationContext - 
listeners
 
 - 
 - 
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 UIsevent- 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 UIseventType- type of eventsourceType- 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)  
 -