Package RTL.SMQ

Class Msg

java.lang.Object
RTL.SMQ.Msg

public class Msg extends Object
Messages received from the broker are encapsulated in Msg instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    final byte[]
    Returns the raw data sent by the broker.
    final long
    Returns the publisher's ephemeral topic ID, i.e.
    final long
    Returns the subtopic ID for which this message was published to or zero if subtopic was not set by the publisher.
    final long
    Returns the topic ID for which this message was published to.
    final String
    Attempt to convert the data from raw UTF-8 to a Java string.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • getData

      public final byte[] getData()
      Returns the raw data sent by the broker.
    • toString

      public final String toString()
      Attempt to convert the data from raw UTF-8 to a Java string.
      Overrides:
      toString in class Object
      Returns:
      the converted string or null if the data cannot be converted.
      See Also:
    • getPTid

      public final long getPTid()
      Returns the publisher's ephemeral topic ID, i.e. the sender's address.
    • getTid

      public final long getTid()
      Returns the topic ID for which this message was published to.
    • getSubTid

      public final long getSubTid()
      Returns the subtopic ID for which this message was published to or zero if subtopic was not set by the publisher.