java.lang.Object
java.lang.Enum<LinkStatus>
org.sentrysoftware.metricshub.engine.common.helpers.state.LinkStatus
All Implemented Interfaces:
Serializable, Comparable<LinkStatus>, Constable, IState

public enum LinkStatus extends Enum<LinkStatus> implements IState
Enumeration representing the link status states. The states are:
  • Enum Constant Details

    • PLUGGED

      public static final LinkStatus PLUGGED
      Represents the plugged state with a numeric value of 1.
    • UNPLUGGED

      public static final LinkStatus UNPLUGGED
      Represents the unplugged state with a numeric value of 0.
  • Method Details

    • values

      public static LinkStatus[] 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 LinkStatus 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
    • interpret

      public static Optional<LinkStatus> interpret(String state)
      Interpret the specified state value:
      • {0, ok, plugged} as Plugged
      • {1, degraded, failed, 2, unplugged} as Unplugged
      Parameters:
      state - String to be interpreted
      Returns:
      Optional of LinkStatus