Class Topic

    • Constructor Detail

      • Topic

        public Topic​(String topic)
    • Method Detail

      • asTopic

        public static Topic asTopic​(String s)
        Factory method
        Parameters:
        s - the topic string (es "/a/b").
        Returns:
        the created Topic instance.
      • headToken

        public Token headToken()
      • isEmpty

        public boolean isEmpty()
      • exceptHeadToken

        public Topic exceptHeadToken()
        Returns:
        a new Topic corresponding to this less than the head token
      • isValid

        public boolean isValid()
      • match

        public boolean match​(Topic subscriptionTopic)
        Verify if the 2 topics matching respecting the rules of MQTT Appendix A
        Parameters:
        subscriptionTopic - the topic filter of the subscription
        Returns:
        true if the two topics match.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object