Package org.ldk.structs
Class CustomMessageHandler
- java.lang.Object
-
- org.ldk.structs.CustomMessageHandler
-
public class CustomMessageHandler extends Object
Handler for BOLT1-compliant messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CustomMessageHandler.CustomMessageHandlerInterface
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
finalize()
TwoTuple_PublicKeyTypeZ[]
get_and_clear_pending_msg()
Gets the list of pending messages which were generated by the custom message handler, clearing the list in the process.CustomMessageReader
get_custom_message_reader()
Gets the underlying CustomMessageReader.Result_NoneLightningErrorZ
handle_custom_message(Type msg, byte[] sender_node_id)
Called with the message type that was received and the buffer to be read.static CustomMessageHandler
new_impl(CustomMessageHandler.CustomMessageHandlerInterface arg, CustomMessageReader.CustomMessageReaderInterface CustomMessageReader_impl)
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
new_impl
public static CustomMessageHandler new_impl(CustomMessageHandler.CustomMessageHandlerInterface arg, CustomMessageReader.CustomMessageReaderInterface CustomMessageReader_impl)
-
get_custom_message_reader
public CustomMessageReader get_custom_message_reader()
Gets the underlying CustomMessageReader.
-
handle_custom_message
public Result_NoneLightningErrorZ handle_custom_message(Type msg, byte[] sender_node_id)
Called with the message type that was received and the buffer to be read. Can return a `MessageHandlingError` if the message could not be handled.
-
get_and_clear_pending_msg
public TwoTuple_PublicKeyTypeZ[] get_and_clear_pending_msg()
Gets the list of pending messages which were generated by the custom message handler, clearing the list in the process. The first tuple element must correspond to the intended recipients node ids. If no connection to one of the specified node does not exist, the message is simply not sent to it.
-
-