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, a permissions policy blocks wake lock in this frame, or the operating system's power-management settings prevent it.
    The request failed for a reason that does not match a more specific code.
    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 (not HTTPS or localhost).
  • 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 (not HTTPS or localhost). This matches the WakeLockAvailability.UNSUPPORTED availability hint, so you can hide wake-lock controls up front rather than letting the request fail.
    • NOT_ALLOWED

      public static final WakeLockErrorCode NOT_ALLOWED
      The browser refused the request, usually because the tab is currently hidden, a permissions policy blocks wake lock in this frame, or the operating system's power-management settings prevent it.
    • UNKNOWN

      public static final WakeLockErrorCode UNKNOWN
      The request failed for a reason that does not match a more specific code. See WakeLockError.message() for the underlying browser message.
  • 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