Enum TLS

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TLS>

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

      • 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 Detail

      • id

        public final java.lang.String id
    • Constructor Detail

    • Method Detail

      • values

        public static TLS[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TLS c : TLS.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TLS valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isComparable

        public boolean isComparable​(ProtocolVersion protocolVersion)
      • getId

        public java.lang.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)
      • excludeWeak

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

        public static boolean isSecure​(java.lang.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