Class PingMessage

    • Method Detail

      • equals

        public boolean equals​(Object o)
      • hashCode

        public int hashCode()
      • getId

        public MessageId getId()
        Description copied from interface: Message
        Returns the unique id of this message. Each message generates a random id when it is created.
        Specified by:
        getId in interface Message
        Returns:
        the unique id of this message. Each message generates a random id when it is created.
      • getUserAgent

        public String getUserAgent()
        Description copied from interface: Message
        Returns the user agent of the sender's node.
        Specified by:
        getUserAgent in interface Message
        Returns:
        the user agent of the sender's node.
      • getNetworkId

        public int getNetworkId()
        Description copied from interface: Message
        Returns the network the sender belongs to.
        Specified by:
        getNetworkId in interface Message
        Returns:
        the network the sender belongs to
      • getProofOfWork

        public ProofOfWork getProofOfWork()
        Description copied from interface: Message
        Returns this message sender's proof of work.
        Specified by:
        getProofOfWork in interface Message
        Returns:
        this message sender's proof of work.
      • getHopCount

        public short getHopCount()
        Description copied from interface: Message
        Returns this message's hop count. Starts at 0 and is incremented every time it is sent. Once the message reaches the limit defined in config drasyl.message.hop-limit it will be dropped.
        Specified by:
        getHopCount in interface Message
        Returns:
        this message's hop count.
      • incrementHopCount

        public void incrementHopCount()
        Description copied from interface: Message
        Increases the message's hop count.
        Specified by:
        incrementHopCount in interface Message