Package com.vaadin.flow.server
Class AbstractSessionLockEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.server.AbstractSessionLockEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SessionLockAcquiredEvent,SessionLockEvent,SessionLockReleasedEvent,SessionLockRequestedEvent
Describes which service an event fired through the
service event bus around acquisition and
release of a Vaadin session lock is about.
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)). The events of a given outermost
lock-hold are fired on the same thread, so timing state can be kept in a
thread local.
Listeners are added for the concrete event types
SessionLockRequestedEvent, SessionLockAcquiredEvent and
SessionLockReleasedEvent, since the event bus dispatches events by
their exact type.
- Since:
- 25.3
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSessionLockEvent(VaadinService service) Creates a new event. -
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
-
AbstractSessionLockEvent
Creates a new 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
-