Enum Class WakeLockErrorCode

java.lang.Object
java.lang.Enum<WakeLockErrorCode>
com.vaadin.flow.component.wakelock.WakeLockErrorCode
All Implemented Interfaces:
Serializable, Comparable<WakeLockErrorCode>, Constable

public enum WakeLockErrorCode extends Enum<WakeLockErrorCode>
Reason a WakeLock.request(onError) call failed.
Since:
25.2
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The browser refused the request — usually because the tab is currently hidden, the feature policy blocks wake lock in this frame, or the user's operating-system power-management settings prevent it.
    The browser rejected the request for a reason that does not match a more specific code, or the executeJs round-trip itself failed.
    The Screen Wake Lock API is unusable in this context — the browser does not implement it, or the page is served over an insecure connection.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • UNSUPPORTED

      public static final WakeLockErrorCode UNSUPPORTED
      The Screen Wake Lock API is unusable in this context — the browser does not implement it, or the page is served over an insecure connection. Matches the WakeLockAvailability.UNSUPPORTED signal value and is delivered without a server-to-client round-trip when the bootstrap probe already established unavailability.
    • NOT_ALLOWED

      public static final WakeLockErrorCode NOT_ALLOWED
      The browser refused the request — usually because the tab is currently hidden, the feature policy blocks wake lock in this frame, or the user's operating-system power-management settings prevent it. Corresponds to a NotAllowedError DOMException from navigator.wakeLock.request('screen').
    • UNKNOWN

      public static final WakeLockErrorCode UNKNOWN
      The browser rejected the request for a reason that does not match a more specific code, or the executeJs round-trip itself failed. The WakeLockError.message() carries the underlying message for diagnostics.
  • Method Details

    • values

      public static WakeLockErrorCode[] 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

      public static WakeLockErrorCode valueOf(String name)
      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 name
      NullPointerException - if the argument is null