Package com.vaadin.flow.server
Class SessionLockEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.server.SessionLockEvent
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the Vaadin service from which this event originates.Gets the Vaadin service from which this event originates.Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
SessionLockEvent
Creates a new session lock event.- Parameters:
service- the Vaadin service whose session lock is being acquired or released, notnull
-
-
Method Details
-
getSource
Gets the Vaadin service from which this event originates.- Overrides:
getSourcein classEventObject- Returns:
- the Vaadin service instance
-
getService
Gets the Vaadin service from which this event originates.- Returns:
- the Vaadin service instance
-