Enum Protocol
- java.lang.Object
-
- java.lang.Enum<Protocol>
-
- eu.europa.esig.dss.spi.client.http.Protocol
-
- All Implemented Interfaces:
Serializable,Comparable<Protocol>
public enum Protocol extends Enum<Protocol>
This enum lists all network protocols that can be used during the signature creation or validation: OCSP, CRL, AIA, TSL...
-
-
Method Summary
Modifier and Type Method Description static ProtocolgetFrom(String urlString)This method try to retrieve the protocol indicated by the given URL string.StringgetName()static booleanisFileUrl(String urlString)Indicates if the given URL uses FILE protocolstatic booleanisFtpUrl(String urlString)Indicates if the given URL uses FTP protocolstatic booleanisHttp(String name)Indicates if the given string represents HTTP protocol.static booleanisHttps(String name)Indicates if the given string represents HTTPS protocol.static booleanisHttpUrl(String urlString)Indicates if the given URL uses HTTP protocolstatic booleanisLdapUrl(String urlString)Indicates if the given URL uses LDAP protocolbooleanisTheSame(String urlString)Indicates if the given URL uses the current protocolstatic ProtocolvalueOf(String name)Returns the enum constant of this type with the specified name.static Protocol[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static Protocol[] 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 Protocol 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 nameNullPointerException- if the argument is null
-
getName
public String getName()
- Returns:
- the name of the protocol
-
isHttps
public static boolean isHttps(String name)
Indicates if the given string represents HTTPS protocol.- Parameters:
name-Stringto be checked- Returns:
- true or false
-
isHttp
public static boolean isHttp(String name)
Indicates if the given string represents HTTP protocol.- Parameters:
name-Stringto be checked- Returns:
- true or false
-
isFileUrl
public static boolean isFileUrl(String urlString)
Indicates if the given URL uses FILE protocol- Parameters:
urlString- to be checked- Returns:
- true or false
-
isHttpUrl
public static boolean isHttpUrl(String urlString)
Indicates if the given URL uses HTTP protocol- Parameters:
urlString- to be checked- Returns:
- true or false
-
isFtpUrl
public static boolean isFtpUrl(String urlString)
Indicates if the given URL uses FTP protocol- Parameters:
urlString- to be checked- Returns:
- true or false
-
isLdapUrl
public static boolean isLdapUrl(String urlString)
Indicates if the given URL uses LDAP protocol- Parameters:
urlString- to be checked- Returns:
- true or false
-
isTheSame
public boolean isTheSame(String urlString)
Indicates if the given URL uses the current protocol- Parameters:
urlString- to be checked- Returns:
- true or false
-
-