Package org.ldk.structs
Class NodeAnnouncementInfo
- java.lang.Object
-
- org.ldk.structs.NodeAnnouncementInfo
-
public class NodeAnnouncementInfo extends Object
Information received in the latest node_announcement from this node.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NetAddress[]
addresses()
Internet-level addresses via which one can connect to the nodeNodeAnnouncementInfo
clone()
Creates a copy of the NodeAnnouncementInfoboolean
eq(NodeAnnouncementInfo b)
Checks if two NodeAnnouncementInfos contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
NodeAlias
get_alias()
Moniker assigned to the node.NodeAnnouncement
get_announcement_message()
An initial announcement of the node Mostly redundant with the data we store in fields explicitly.NodeFeatures
get_features()
Protocol features the node announced support forint
get_last_update()
When the last known update to the node state was issued.byte[]
get_rgb()
Color assigned to the nodestatic NodeAnnouncementInfo
of(NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, NodeAlias alias_arg, NodeAnnouncement announcement_message_arg)
Constructs a new NodeAnnouncementInfo given each fieldstatic Result_NodeAnnouncementInfoDecodeErrorZ
read(byte[] ser)
Read a NodeAnnouncementInfo from a byte array, created by NodeAnnouncementInfo_writevoid
set_alias(NodeAlias val)
Moniker assigned to the node.void
set_announcement_message(NodeAnnouncement val)
An initial announcement of the node Mostly redundant with the data we store in fields explicitly.void
set_features(NodeFeatures val)
Protocol features the node announced support forvoid
set_last_update(int val)
When the last known update to the node state was issued.void
set_rgb(byte[] val)
Color assigned to the nodebyte[]
write()
Serialize the NodeAnnouncementInfo object into a byte array which can be read by NodeAnnouncementInfo_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
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
-
of
public static NodeAnnouncementInfo of(NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, NodeAlias alias_arg, NodeAnnouncement announcement_message_arg)
Constructs a new NodeAnnouncementInfo given each field
-
clone
public NodeAnnouncementInfo clone()
Creates a copy of the NodeAnnouncementInfo
-
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
-
read
public static Result_NodeAnnouncementInfoDecodeErrorZ read(byte[] ser)
Read a NodeAnnouncementInfo from a byte array, created by NodeAnnouncementInfo_write
-
-