- All Implemented Interfaces:
Serializable,Comparable<MessageType>,Constable
Represents the types of messages exchanged during WebRTC signaling.
Each message type corresponds to a specific action or state in the WebRTC connection process.
- Author:
- Alex Andres
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWebRTC answer message containing session description.Heartbeat message to maintain connection.Acknowledgment response to a heartbeat message.ICE candidate information for establishing peer connections.Message indicating a peer joining the signaling session.Message indicating a peer leaving the signaling session.WebRTC offer message containing session description.Fallback type for unrecognized messages. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageTypefromString(String text) Finds and returns the message type enum constant that matches the given string.getValue()Returns the string representation of this message type.static MessageTypeReturns the enum constant of this class with the specified name.static MessageType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OFFER
WebRTC offer message containing session description. -
ANSWER
WebRTC answer message containing session description. -
ICE_CANDIDATE
ICE candidate information for establishing peer connections. -
JOIN
Message indicating a peer joining the signaling session. -
LEAVE
Message indicating a peer leaving the signaling session. -
HEARTBEAT
Heartbeat message to maintain connection. -
HEARTBEAT_ACK
Acknowledgment response to a heartbeat message. -
UNKNOWN
Fallback type for unrecognized messages.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
Returns the string representation of this message type.- Returns:
- The string value of this message type
-
fromString
Finds and returns the message type enum constant that matches the given string.- Parameters:
text- The string to convert to a message type- Returns:
- The matching message type, or UNKNOWN if no match is found
-