Package org.ldk.structs
Class Router
- java.lang.Object
-
- org.ldk.structs.Router
-
public class Router extends Object
A trait defining behavior for routing a payment.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Router.RouterInterface
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Destroys the object, freeing associated resources.protected void
finalize()
Result_RouteLightningErrorZ
find_route(byte[] payer, RouteParameters route_params, ChannelDetails[] first_hops, InFlightHtlcs inflight_htlcs)
Finds a [`Route`] between `payer` and `payee` for a payment with the given values.Result_RouteLightningErrorZ
find_route_with_id(byte[] payer, RouteParameters route_params, ChannelDetails[] first_hops, InFlightHtlcs inflight_htlcs, byte[] _payment_hash, byte[] _payment_id)
Finds a [`Route`] between `payer` and `payee` for a payment with the given values.static Router
new_impl(Router.RouterInterface arg)
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
destroy
public void destroy()
Destroys the object, freeing associated resources. After this call, any access to this object may result in a SEGFAULT or worse. You should generally NEVER call this method. You should let the garbage collector do this for you when it finalizes objects. However, it may be useful for types which represent locks and should be closed immediately to avoid holding locks until the GC runs.
-
new_impl
public static Router new_impl(Router.RouterInterface arg)
-
find_route
public Result_RouteLightningErrorZ find_route(byte[] payer, RouteParameters route_params, @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
-
find_route_with_id
public Result_RouteLightningErrorZ find_route_with_id(byte[] payer, RouteParameters route_params, @Nullable ChannelDetails[] first_hops, InFlightHtlcs inflight_htlcs, byte[] _payment_hash, byte[] _payment_id)
Finds a [`Route`] between `payer` and `payee` for a payment with the given values. Includes `PaymentHash` and `PaymentId` to be able to correlate the request with a specific payment. Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
-
-