Package org.ldk.structs
Class CustomOnionMessageHandler
- java.lang.Object
-
- org.ldk.structs.CustomOnionMessageHandler
-
public class CustomOnionMessageHandler extends Object
Handler for custom onion messages. If you are using [`SimpleArcOnionMessenger`], [`SimpleRefOnionMessenger`], or prefer to ignore inbound custom onion messages, [`IgnoringMessageHandler`] must be provided to [`OnionMessenger::new`]. Otherwise, a custom implementation of this trait must be provided, with [`CustomMessage`] specifying the supported message types. See [`OnionMessenger`] for example usage. [`IgnoringMessageHandler`]: crate::ln::peer_handler::IgnoringMessageHandler [`CustomMessage`]: Self::CustomMessage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCustomOnionMessageHandler.CustomOnionMessageHandlerInterface
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinalize()voidhandle_custom_message(CustomOnionMessageContents msg)Called with the custom message that was received.static CustomOnionMessageHandlernew_impl(CustomOnionMessageHandler.CustomOnionMessageHandlerInterface arg)Result_COption_CustomOnionMessageContentsZDecodeErrorZread_custom_message(long message_type, byte[] buffer)Read a custom message of type `message_type` from `buffer`, returning `Ok(None)` if the message type is unknown.
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
new_impl
public static CustomOnionMessageHandler new_impl(CustomOnionMessageHandler.CustomOnionMessageHandlerInterface arg)
-
handle_custom_message
public void handle_custom_message(CustomOnionMessageContents msg)
Called with the custom message that was received.
-
read_custom_message
public Result_COption_CustomOnionMessageContentsZDecodeErrorZ read_custom_message(long message_type, byte[] buffer)
Read a custom message of type `message_type` from `buffer`, returning `Ok(None)` if the message type is unknown.
-
-