Class SessionLockEvent

java.lang.Object
java.util.EventObject
com.vaadin.flow.server.SessionLockEvent
All Implemented Interfaces:
Serializable

public class SessionLockEvent extends EventObject
Event fired to SessionLockListeners around acquisition and release of a Vaadin session lock.

The same lock instance protects a session whether it is acquired by the framework while handling a request or via VaadinSession.lock() (for example from UI.access(Command)). A listener receives SessionLockListener.lockRequested(com.vaadin.flow.server.SessionLockEvent), SessionLockListener.lockAcquired(com.vaadin.flow.server.SessionLockEvent) and SessionLockListener.lockReleased(com.vaadin.flow.server.SessionLockEvent) on the same thread for a given outermost lock-hold, so timing state can be kept in a thread local.

Since:
25.2
See Also:
  • Constructor Details

    • SessionLockEvent

      public SessionLockEvent(VaadinService service)
      Creates a new session lock event.
      Parameters:
      service - the Vaadin service whose session lock is being acquired or released, not null
  • Method Details

    • getSource

      public VaadinService getSource()
      Gets the Vaadin service from which this event originates.
      Overrides:
      getSource in class EventObject
      Returns:
      the Vaadin service instance
    • getService

      public VaadinService getService()
      Gets the Vaadin service from which this event originates.
      Returns:
      the Vaadin service instance