com.vaadin.flow.server.
Enum Class SessionLockCheckStrategy
All Implemented Interfaces:
Serializable
, Comparable<SessionLockCheckStrategy>
, Constable
Available strategies for session lock checking.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe default strategy, runs Java `assert` statement.
If the session doesn't have a lock, a warning message is logged to the log but the code execution continues normally.
If the session doesn't have a lock, an
IllegalStateException
is thrown. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
checkHasLock
(VaadinSession session, String message) Potentially checks whether this session is currently locked by the current thread
static SessionLockCheckStrategy
Returns the enum constant of this class with the specified name.
static SessionLockCheckStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ASSERT
The default strategy, runs Java `assert` statement. Does nothing when assertions are disabled (the default for JVM).
-
LOG
If the session doesn't have a lock, a warning message is logged to the log but the code execution continues normally.
-
THROW
If the session doesn't have a lock, an
IllegalStateException
is thrown.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.
Returns:
an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
Parameters:
name
- the name of the enum constant to be returned.Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null -
checkHasLock
Potentially checks whether this session is currently locked by the current thread
Parameters:
session
- the session to check the lock for, not null.message
- the error message to include when failing if the check is done and the session is not locked
-