Enum TLS

java.lang.Object
java.lang.Enum<TLS>
org.apache.hc.core5.http.ssl.TLS
All Implemented Interfaces:
Serializable, Comparable<TLS>

public enum TLS extends Enum<TLS>
Supported TLS protocol versions.
Since:
5.0
  • Enum Constant Details

    • V_1_0

      public static final TLS V_1_0
    • V_1_1

      public static final TLS V_1_1
    • V_1_2

      public static final TLS V_1_2
    • V_1_3

      public static final TLS V_1_3
  • Field Details

  • Constructor Details

  • Method Details

    • values

      public static TLS[] 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 TLS 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
    • isSame

      public boolean isSame(ProtocolVersion protocolVersion)
    • isComparable

      public boolean isComparable(ProtocolVersion protocolVersion)
    • getId

      public String getId()
      Gets the ID.
      Returns:
      the ID.
      Since:
      5.2
    • getVersion

      public ProtocolVersion getVersion()
      Gets the version.
      Returns:
      the version.
      Since:
      5.2
    • greaterEquals

      public boolean greaterEquals(ProtocolVersion protocolVersion)
    • lessEquals

      public boolean lessEquals(ProtocolVersion protocolVersion)
    • parse

      public static ProtocolVersion parse(String s) throws ParseException
      Throws:
      ParseException
    • excludeWeak

      public static String[] excludeWeak(String... protocols)
    • isSecure

      public static boolean isSecure(String protocol)
      Check if a given protocol is considered secure and is enabled by default.
      Returns:
      true if the given protocol is secure and enabled, otherwise return false.
      Since:
      5.2