Class Message

  • Direct Known Subclasses:
    BinaryMessage, TextMessage

    public abstract class Message
    extends java.lang.Object
    Represents a WebSocket message. A message can either be a binary message or a text message.
    • Constructor Detail

      • Message

        public Message()
    • Method Detail

      • isText

        public abstract boolean isText()
        Is this message a text message? If true, asTextMessage() will return this text message, if false, asBinaryMessage() will return this binary message.
        Returns:
        (undocumented)
      • isStrict

        public abstract boolean isStrict()
        Is this message a strict one?
      • asTextMessage

        public abstract TextMessage asTextMessage()
        Returns this TextMessage if it is a text message, throws otherwise.
        Returns:
        (undocumented)
      • asBinaryMessage

        public abstract BinaryMessage asBinaryMessage()
        Returns this BinaryMessage if it is a binary message, throws otherwise.
        Returns:
        (undocumented)
      • asScala

        public abstract Message asScala()