Class SessionHolder

java.lang.Object
io.jmix.flowui.sys.SessionHolder
All Implemented Interfaces:
com.vaadin.flow.server.VaadinServiceInitListener, Serializable, EventListener

@Component("flowui_SessionHolder") public class SessionHolder extends Object implements com.vaadin.flow.server.VaadinServiceInitListener
Holds vaadin sessions for all users
See Also:
  • Field Details

  • Constructor Details

    • SessionHolder

      public SessionHolder()
  • Method Details

    • getActiveSessionsForUsernames

      public Map<String,List<com.vaadin.flow.server.VaadinSession>> getActiveSessionsForUsernames(@Nullable Collection<String> usernames)
      Provides active (not collected by gc) vaadin sessions mapped on specified usernames
      Parameters:
      usernames - usernames of users which sessions should be provided. Null means that sessions for all users will be returned.
      Returns:
      active user vaadin sessions
    • getUsernameFromVaadinSession

      @Nullable protected String getUsernameFromVaadinSession(com.vaadin.flow.server.VaadinSession session)
    • serviceInit

      public void serviceInit(com.vaadin.flow.server.ServiceInitEvent event)
      Specified by:
      serviceInit in interface com.vaadin.flow.server.VaadinServiceInitListener
    • onSessionInit

      protected void onSessionInit(com.vaadin.flow.server.SessionInitEvent event)