Enum Class AutoUpdatePolicy

All Implemented Interfaces:
Serializable, Comparable<AutoUpdatePolicy>, Constable

@NonNullByDefault public enum AutoUpdatePolicy extends Enum<AutoUpdatePolicy>
A binding's recommendation to the framework whether a state update should be automatically sent to an item if a command was received.
Simon Kaufmann - Initial contribution
  • Enum Constant Details

    • VETO

      public static final AutoUpdatePolicy VETO
      No automatic state update should be sent by the framework. The handler will make sure it sends a state update and it can do it better than just converting the command to a state.

      public static final AutoUpdatePolicy DEFAULT
      The binding does not care and the framework may do what it deems to be right. The state update which the framework will send out normally will correspond the command state anyway. This is the default if no other policy is set.

      public static final AutoUpdatePolicy RECOMMEND
      An automatic state update should be sent by the framework because no updates will be sent by the binding. This usually is the case when devices don't expose their current state to the handler.
  • Method Details

    • values

      public static AutoUpdatePolicy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AutoUpdatePolicy 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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • parse

      public static @Nullable AutoUpdatePolicy parse(@Nullable String input)
      Parses the input string into an AutoUpdatePolicy.
      input - the input string
      the parsed AutoUpdatePolicy or null if the input was null
      IllegalArgumentException - if the input couldn't be parsed.