Package org.ldk.enums
Enum PaymentFailureReason
- java.lang.Object
-
- java.lang.Enum<PaymentFailureReason>
-
- org.ldk.enums.PaymentFailureReason
-
- All Implemented Interfaces:
Serializable
,Comparable<PaymentFailureReason>
public enum PaymentFailureReason extends Enum<PaymentFailureReason>
The reason the payment failed. Used in [`Event::PaymentFailed`].
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LDKPaymentFailureReason_PaymentExpired
The payment expired while retrying, based on the provided [`PaymentParameters::expiry_time`].LDKPaymentFailureReason_RecipientRejected
The intended recipient rejected our payment.LDKPaymentFailureReason_RetriesExhausted
We exhausted all of our retry attempts while trying to send the payment, or we exhausted the [`Retry::Timeout`] if the user set one.LDKPaymentFailureReason_RouteNotFound
We failed to find a route while retrying the payment.LDKPaymentFailureReason_UnexpectedError
This error should generally never happen.LDKPaymentFailureReason_UserAbandoned
The user chose to abandon this payment by calling [`ChannelManager::abandon_payment`].
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PaymentFailureReason
valueOf(String name)
Returns the enum constant of this type with the specified name.static PaymentFailureReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LDKPaymentFailureReason_RecipientRejected
public static final PaymentFailureReason LDKPaymentFailureReason_RecipientRejected
The intended recipient rejected our payment.
-
LDKPaymentFailureReason_UserAbandoned
public static final PaymentFailureReason LDKPaymentFailureReason_UserAbandoned
The user chose to abandon this payment by calling [`ChannelManager::abandon_payment`]. [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
-
LDKPaymentFailureReason_RetriesExhausted
public static final PaymentFailureReason LDKPaymentFailureReason_RetriesExhausted
We exhausted all of our retry attempts while trying to send the payment, or we exhausted the [`Retry::Timeout`] if the user set one. If at any point a retry attempt failed while being forwarded along the path, an [`Event::PaymentPathFailed`] will have come before this. [`Retry::Timeout`]: crate::ln::channelmanager::Retry::Timeout
-
LDKPaymentFailureReason_PaymentExpired
public static final PaymentFailureReason LDKPaymentFailureReason_PaymentExpired
The payment expired while retrying, based on the provided [`PaymentParameters::expiry_time`]. [`PaymentParameters::expiry_time`]: crate::routing::router::PaymentParameters::expiry_time
-
LDKPaymentFailureReason_RouteNotFound
public static final PaymentFailureReason LDKPaymentFailureReason_RouteNotFound
We failed to find a route while retrying the payment.
-
LDKPaymentFailureReason_UnexpectedError
public static final PaymentFailureReason LDKPaymentFailureReason_UnexpectedError
This error should generally never happen. This likely means that there is a problem with your router.
-
-
Method Detail
-
values
public static PaymentFailureReason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PaymentFailureReason c : PaymentFailureReason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PaymentFailureReason valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-