Class SignalingMessage

java.lang.Object
dev.onvoid.webrtc.examples.web.model.SignalingMessage
Direct Known Subclasses:
IceCandidateMessage, JoinMessage, LeaveMessage, SessionDescriptionMessage

public class SignalingMessage extends Object
Base class for all signaling messages.

This class represents the common structure of all messages exchanged during WebRTC signaling. Specific message types extend this class and add their own data payload.

Author:
Alex Andres
  • Constructor Details

    • SignalingMessage

      public SignalingMessage()
      Default constructor required for JSON deserialization.
    • SignalingMessage

      public SignalingMessage(String type)
      Creates a new SignalingMessage with the specified type.
      Parameters:
      type - the message type.
    • SignalingMessage

      public SignalingMessage(String type, String from, String to)
      Creates a new SignalingMessage with the specified type, sender, and recipient.
      Parameters:
      type - the message type.
      from - the sender ID.
      to - the recipient ID.
  • Method Details

    • getType

      public String getType()
      Gets the message type.
      Returns:
      the message type.
    • setType

      public void setType(String type)
      Sets the message type.
      Parameters:
      type - the message type.
    • getFrom

      public String getFrom()
      Gets the sender ID.
      Returns:
      the sender ID.
    • setFrom

      public void setFrom(String from)
      Sets the sender ID.
      Parameters:
      from - the sender ID.
    • getTo

      public String getTo()
      Gets the recipient ID.
      Returns:
      the recipient ID.
    • setTo

      public void setTo(String to)
      Sets the recipient ID.
      Parameters:
      to - the recipient ID.