Package org.ldk.structs
Class WarningMessage
- java.lang.Object
-
- org.ldk.structs.WarningMessage
-
public class WarningMessage extends Object
A [`warning`] message to be sent to or received from a peer. [`warning`]: https://github.com/lightning/bolts/blob/master/01-messaging.md#the-error-and-warning-messages
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WarningMessage
clone()
Creates a copy of the WarningMessageboolean
eq(WarningMessage b)
Checks if two WarningMessages contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
byte[]
get_channel_id()
The channel ID involved in the warning.String
get_data()
A possibly human-readable warning description.static WarningMessage
of(byte[] channel_id_arg, String data_arg)
Constructs a new WarningMessage given each fieldstatic Result_WarningMessageDecodeErrorZ
read(byte[] ser)
Read a WarningMessage from a byte array, created by WarningMessage_writevoid
set_channel_id(byte[] val)
The channel ID involved in the warning.void
set_data(String val)
A possibly human-readable warning description.byte[]
write()
Serialize the WarningMessage object into a byte array which can be read by WarningMessage_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_channel_id
public byte[] get_channel_id()
The channel ID involved in the warning. All-0s indicates a warning unrelated to a specific channel.
-
set_channel_id
public void set_channel_id(byte[] val)
The channel ID involved in the warning. All-0s indicates a warning unrelated to a specific channel.
-
get_data
public String get_data()
A possibly human-readable warning description. The string should be sanitized before it is used (e.g. emitted to logs or printed to stdout). Otherwise, a well crafted error message may trigger a security vulnerability in the terminal emulator or the logging subsystem.
-
set_data
public void set_data(String val)
A possibly human-readable warning description. The string should be sanitized before it is used (e.g. emitted to logs or printed to stdout). Otherwise, a well crafted error message may trigger a security vulnerability in the terminal emulator or the logging subsystem.
-
of
public static WarningMessage of(byte[] channel_id_arg, String data_arg)
Constructs a new WarningMessage given each field
-
clone
public WarningMessage clone()
Creates a copy of the WarningMessage
-
eq
public boolean eq(WarningMessage b)
Checks if two WarningMessages 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.
-
write
public byte[] write()
Serialize the WarningMessage object into a byte array which can be read by WarningMessage_read
-
read
public static Result_WarningMessageDecodeErrorZ read(byte[] ser)
Read a WarningMessage from a byte array, created by WarningMessage_write
-
-