Package org.ldk.structs
Class PaymentSendFailure
- java.lang.Object
-
- org.ldk.structs.PaymentSendFailure
-
- Direct Known Subclasses:
PaymentSendFailure.AllFailedResendSafe
,PaymentSendFailure.DuplicatePayment
,PaymentSendFailure.ParameterError
,PaymentSendFailure.PartialFailure
,PaymentSendFailure.PathParameterError
public class PaymentSendFailure extends Object
If a payment fails to send with [`ChannelManager::send_payment_with_route`], it can be in one of several states. This enum is returned as the Err() type describing which state the payment is in, see the description of individual enum states for more. [`ChannelManager::send_payment_with_route`]: crate::ln::channelmanager::ChannelManager::send_payment_with_route
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PaymentSendFailure.AllFailedResendSafe
All paths which were attempted failed to send, with no channel state change taking place.static class
PaymentSendFailure.DuplicatePayment
Indicates that a payment for the provided [`PaymentId`] is already in-flight and has not yet completed (i.e.static class
PaymentSendFailure.ParameterError
A parameter which was passed to send_payment was invalid, preventing us from attempting to send the payment at all.static class
PaymentSendFailure.PartialFailure
Some paths that were attempted failed to send, though some paths may have succeeded.static class
PaymentSendFailure.PathParameterError
A parameter in a single path which was passed to send_payment was invalid, preventing us from attempting to send the payment at all.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PaymentSendFailure
all_failed_resend_safe(APIError[] a)
Utility method to constructs a new AllFailedResendSafe-variant PaymentSendFailurePaymentSendFailure
clone()
Creates a copy of the PaymentSendFailurestatic PaymentSendFailure
duplicate_payment()
Utility method to constructs a new DuplicatePayment-variant PaymentSendFailureprotected void
finalize()
static PaymentSendFailure
parameter_error(APIError a)
Utility method to constructs a new ParameterError-variant PaymentSendFailurestatic PaymentSendFailure
partial_failure(Result_NoneAPIErrorZ[] results, RouteParameters failed_paths_retry, byte[] payment_id)
Utility method to constructs a new PartialFailure-variant PaymentSendFailurestatic PaymentSendFailure
path_parameter_error(Result_NoneAPIErrorZ[] a)
Utility method to constructs a new PathParameterError-variant PaymentSendFailure
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public PaymentSendFailure clone()
Creates a copy of the PaymentSendFailure
-
parameter_error
public static PaymentSendFailure parameter_error(APIError a)
Utility method to constructs a new ParameterError-variant PaymentSendFailure
-
path_parameter_error
public static PaymentSendFailure path_parameter_error(Result_NoneAPIErrorZ[] a)
Utility method to constructs a new PathParameterError-variant PaymentSendFailure
-
all_failed_resend_safe
public static PaymentSendFailure all_failed_resend_safe(APIError[] a)
Utility method to constructs a new AllFailedResendSafe-variant PaymentSendFailure
-
duplicate_payment
public static PaymentSendFailure duplicate_payment()
Utility method to constructs a new DuplicatePayment-variant PaymentSendFailure
-
partial_failure
public static PaymentSendFailure partial_failure(Result_NoneAPIErrorZ[] results, RouteParameters failed_paths_retry, byte[] payment_id)
Utility method to constructs a new PartialFailure-variant PaymentSendFailure
-
-