Package net.dv8tion.jda.api
Enum GatewayEncoding
- java.lang.Object
-
- java.lang.Enum<GatewayEncoding>
-
- net.dv8tion.jda.api.GatewayEncoding
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<GatewayEncoding>
public enum GatewayEncoding extends java.lang.Enum<GatewayEncoding>
Encoding mode used by the gateway for incoming and outgoing payloads.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GatewayEncoding
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static GatewayEncoding[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JSON
public static final GatewayEncoding JSON
Standard JSON format. This format uses a human-readable string encoding.- See Also:
- JSON Specification
-
ETF
public static final GatewayEncoding ETF
Erlang External Term Format (binary). This is an optimized format which encodes all payloads in a binary stream.- Since:
- 4.2.1
- See Also:
- Erlang -- External Term Format
-
-
Method Detail
-
values
public static GatewayEncoding[] 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 (GatewayEncoding c : GatewayEncoding.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GatewayEncoding 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
-
-