Enum ModeSupport

java.lang.Object
java.lang.Enum<ModeSupport>
org.aesh.terminal.detect.ModeSupport
All Implemented Interfaces:
Serializable, Comparable<ModeSupport>

public enum ModeSupport extends Enum<ModeSupport>
Three-state result of a DEC private mode probe via DECRQM.

The three states enable smart fallbacks:

  • SUPPORTED — terminal responded positively to DECRQM
  • NOT_SUPPORTED — terminal responded to DA1 (speaks escapes) but did not respond to DECRQM for this mode
  • NO_RESPONSE — terminal did not respond to DA1 at all (dumb terminal, no probes safe)
  • Enum Constant Details

    • SUPPORTED

      public static final ModeSupport SUPPORTED
      Terminal responded to DECRQM with Ps=1 (set), Ps=2 (reset but recognized), or Ps=3 (permanently set). The mode is known to be supported.
    • NOT_SUPPORTED

      public static final ModeSupport NOT_SUPPORTED
      Terminal responded to DA1 (it speaks escape sequences) but did not respond to DECRQM for this mode. The mode is not supported, but cursor-position fallbacks are safe to use.
    • NO_RESPONSE

      public static final ModeSupport NO_RESPONSE
      Terminal did not respond to DA1 at all. This is a dumb terminal — no further probes should be attempted (they would all time out).
  • Method Details

    • values

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

      public static ModeSupport valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null