Class NodeAnnouncementInfo


  • public class NodeAnnouncementInfo
    extends Object
    Information received in the latest node_announcement from this node.
    • Method Detail

      • get_features

        public NodeFeatures get_features()
        Protocol features the node announced support for
      • set_features

        public void set_features​(NodeFeatures val)
        Protocol features the node announced support for
      • get_last_update

        public int get_last_update()
        When the last known update to the node state was issued. Value is opaque, as set in the announcement.
      • set_last_update

        public void set_last_update​(int val)
        When the last known update to the node state was issued. Value is opaque, as set in the announcement.
      • get_rgb

        public byte[] get_rgb()
        Color assigned to the node
      • set_rgb

        public void set_rgb​(byte[] val)
        Color assigned to the node
      • get_alias

        public NodeAlias get_alias()
        Moniker assigned to the node. May be invalid or malicious (eg control chars), should not be exposed to the user.
      • set_alias

        public void set_alias​(NodeAlias val)
        Moniker assigned to the node. May be invalid or malicious (eg control chars), should not be exposed to the user.
      • get_announcement_message

        @Nullable
        public NodeAnnouncement get_announcement_message()
        An initial announcement of the node Mostly redundant with the data we store in fields explicitly. Everything else is useful only for sending out for initial routing sync. Not stored if contains excess data to prevent DoS. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
      • set_announcement_message

        public void set_announcement_message​(@Nullable
                                             NodeAnnouncement val)
        An initial announcement of the node Mostly redundant with the data we store in fields explicitly. Everything else is useful only for sending out for initial routing sync. Not stored if contains excess data to prevent DoS. Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
      • eq

        public boolean eq​(NodeAnnouncementInfo b)
        Checks if two NodeAnnouncementInfos contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
      • addresses

        public NetAddress[] addresses()
        Internet-level addresses via which one can connect to the node
      • write

        public byte[] write()
        Serialize the NodeAnnouncementInfo object into a byte array which can be read by NodeAnnouncementInfo_read