Package org.apache.hc.core5.http.ssl
Enum TLS
- java.lang.Object
-
- java.lang.Enum<TLS>
-
- org.apache.hc.core5.http.ssl.TLS
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringidProtocolVersionversion
-
Constructor Summary
Constructors Modifier Constructor Description privateTLS(java.lang.String id, ProtocolVersion version)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String[]excludeWeak(java.lang.String... protocols)java.lang.StringgetId()Gets the ID.ProtocolVersiongetVersion()Gets the version.booleangreaterEquals(ProtocolVersion protocolVersion)booleanisComparable(ProtocolVersion protocolVersion)booleanisSame(ProtocolVersion protocolVersion)static booleanisSecure(java.lang.String protocol)Check if a given protocol is considered secure and is enabled by default.booleanlessEquals(ProtocolVersion protocolVersion)static ProtocolVersionparse(java.lang.String s)static TLSvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TLS[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Field Detail
-
id
public final java.lang.String id
-
version
public final ProtocolVersion version
-
-
Constructor Detail
-
TLS
private TLS(java.lang.String id, ProtocolVersion version)
-
-
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 namejava.lang.NullPointerException- if the argument is null
-
isSame
public boolean isSame(ProtocolVersion protocolVersion)
-
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)
-
parse
public static ProtocolVersion parse(java.lang.String s) throws ParseException
- Throws:
ParseException
-
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:
trueif the given protocol is secure and enabled, otherwise returnfalse.- Since:
- 5.2
-
-