Package org.ldk.structs
Class Router
- java.lang.Object
-
- org.ldk.structs.Router
-
public class Router extends Object
A trait defining behavior for routing an [`Invoice`] payment.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRouter.RouterInterface
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinalize()Result_RouteLightningErrorZfind_route(byte[] payer, RouteParameters route_params, byte[] payment_hash, ChannelDetails[] first_hops, InFlightHtlcs inflight_htlcs)Finds a [`Route`] between `payer` and `payee` for a payment with the given values.static Routernew_impl(Router.RouterInterface arg)voidnotify_payment_path_failed(RouteHop[] path, long short_channel_id)Lets the router know that payment through a specific path has failed.voidnotify_payment_path_successful(RouteHop[] path)Lets the router know that payment through a specific path was successful.voidnotify_payment_probe_failed(RouteHop[] path, long short_channel_id)Lets the router know that a payment probe failed.voidnotify_payment_probe_successful(RouteHop[] path)Lets the router know that a payment probe was successful.
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
new_impl
public static Router new_impl(Router.RouterInterface arg)
-
find_route
public Result_RouteLightningErrorZ find_route(byte[] payer, RouteParameters route_params, byte[] payment_hash, @Nullable ChannelDetails[] first_hops, InFlightHtlcs inflight_htlcs)
Finds a [`Route`] between `payer` and `payee` for a payment with the given values. Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
-
notify_payment_path_failed
public void notify_payment_path_failed(RouteHop[] path, long short_channel_id)
Lets the router know that payment through a specific path has failed.
-
notify_payment_path_successful
public void notify_payment_path_successful(RouteHop[] path)
Lets the router know that payment through a specific path was successful.
-
notify_payment_probe_successful
public void notify_payment_probe_successful(RouteHop[] path)
Lets the router know that a payment probe was successful.
-
notify_payment_probe_failed
public void notify_payment_probe_failed(RouteHop[] path, long short_channel_id)
Lets the router know that a payment probe failed.
-
-