Package org.ldk.structs
Class CustomMessageReader
- java.lang.Object
-
- org.ldk.structs.CustomMessageReader
-
public class CustomMessageReader extends Object
Trait to be implemented by custom message (unrelated to the channel/gossip LN layers) decoders.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CustomMessageReader.CustomMessageReaderInterface
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
finalize()
static CustomMessageReader
new_impl(CustomMessageReader.CustomMessageReaderInterface arg)
Result_COption_TypeZDecodeErrorZ
read(short message_type, byte[] buffer)
Decodes a custom message to `CustomMessageType`.
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
new_impl
public static CustomMessageReader new_impl(CustomMessageReader.CustomMessageReaderInterface arg)
-
read
public Result_COption_TypeZDecodeErrorZ read(short message_type, byte[] buffer)
Decodes a custom message to `CustomMessageType`. If the given message type is known to the implementation and the message could be decoded, must return `Ok(Some(message))`. If the message type is unknown to the implementation, must return `Ok(None)`. If a decoding error occur, must return `Err(DecodeError::X)` where `X` details the encountered error.
-
-