Enum CommunicationProtocol
- java.lang.Object
-
- java.lang.Enum<CommunicationProtocol>
-
- com.github.dannil.scbjavaclient.communication.CommunicationProtocol
-
- All Implemented Interfaces:
Serializable
,Comparable<CommunicationProtocol>
public enum CommunicationProtocol extends Enum<CommunicationProtocol>
Enumerable for the available communication protocols which the API (and in extension this library) can accept.
- Since:
- 1.2.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getProtocol()
Returns the protocol.static CommunicationProtocol
valueOf(String name)
Returns the enum constant of this type with the specified name.static CommunicationProtocol[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
HTTP
public static final CommunicationProtocol HTTP
-
HTTPS
public static final CommunicationProtocol HTTPS
-
-
Method Detail
-
values
public static CommunicationProtocol[] 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 (CommunicationProtocol c : CommunicationProtocol.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CommunicationProtocol 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
-
getProtocol
public String getProtocol()
Returns the protocol.
- Returns:
- the protocol
-
-