Package org.ldk.structs
Class ClosureReason
- java.lang.Object
-
- org.ldk.structs.ClosureReason
-
- Direct Known Subclasses:
ClosureReason.CommitmentTxConfirmed,ClosureReason.CooperativeClosure,ClosureReason.CounterpartyCoopClosedUnfundedChannel,ClosureReason.CounterpartyForceClosed,ClosureReason.DisconnectedPeer,ClosureReason.FundingBatchClosure,ClosureReason.FundingTimedOut,ClosureReason.HolderForceClosed,ClosureReason.OutdatedChannelManager,ClosureReason.ProcessingError
public class ClosureReason extends Object
The reason the channel was closed. See individual variants for more details.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClosureReason.CommitmentTxConfirmedA commitment transaction was confirmed on chain, closing the channel.static classClosureReason.CooperativeClosureThe channel was closed after negotiating a cooperative close and we've now broadcasted the cooperative close transaction.static classClosureReason.CounterpartyCoopClosedUnfundedChannelThe counterparty requested a cooperative close of a channel that had not been funded yet.static classClosureReason.CounterpartyForceClosedClosure generated from receiving a peer error message.static classClosureReason.DisconnectedPeerThe peer disconnected prior to funding completing.static classClosureReason.FundingBatchClosureAnother channel in the same funding batch closed before the funding transaction was ready to be broadcast.static classClosureReason.FundingTimedOutThe funding transaction failed to confirm in a timely manner on an inbound channel.static classClosureReason.HolderForceClosedClosure generated from [`ChannelManager::force_close_channel`], called by the user.static classClosureReason.OutdatedChannelManagerClosure generated from `ChannelManager::read` if the [`ChannelMonitor`] is newer than the [`ChannelManager`] deserialized.static classClosureReason.ProcessingErrorClosure generated from processing an event, likely a HTLC forward/relay/reception.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClosureReasonclone()Creates a copy of the ClosureReasonstatic ClosureReasoncommitment_tx_confirmed()Utility method to constructs a new CommitmentTxConfirmed-variant ClosureReasonstatic ClosureReasoncooperative_closure()Utility method to constructs a new CooperativeClosure-variant ClosureReasonstatic ClosureReasoncounterparty_coop_closed_unfunded_channel()Utility method to constructs a new CounterpartyCoopClosedUnfundedChannel-variant ClosureReasonstatic ClosureReasoncounterparty_force_closed(UntrustedString peer_msg)Utility method to constructs a new CounterpartyForceClosed-variant ClosureReasonstatic ClosureReasondisconnected_peer()Utility method to constructs a new DisconnectedPeer-variant ClosureReasonbooleaneq(ClosureReason b)Checks if two ClosureReasons contain equal inner contents.booleanequals(Object o)protected voidfinalize()static ClosureReasonfunding_batch_closure()Utility method to constructs a new FundingBatchClosure-variant ClosureReasonstatic ClosureReasonfunding_timed_out()Utility method to constructs a new FundingTimedOut-variant ClosureReasonstatic ClosureReasonholder_force_closed()Utility method to constructs a new HolderForceClosed-variant ClosureReasonstatic ClosureReasonoutdated_channel_manager()Utility method to constructs a new OutdatedChannelManager-variant ClosureReasonstatic ClosureReasonprocessing_error(String err)Utility method to constructs a new ProcessingError-variant ClosureReasonbyte[]write()Serialize the ClosureReason object into a byte array which can be read by ClosureReason_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public ClosureReason clone()
Creates a copy of the ClosureReason
-
counterparty_force_closed
public static ClosureReason counterparty_force_closed(UntrustedString peer_msg)
Utility method to constructs a new CounterpartyForceClosed-variant ClosureReason
-
holder_force_closed
public static ClosureReason holder_force_closed()
Utility method to constructs a new HolderForceClosed-variant ClosureReason
-
cooperative_closure
public static ClosureReason cooperative_closure()
Utility method to constructs a new CooperativeClosure-variant ClosureReason
-
commitment_tx_confirmed
public static ClosureReason commitment_tx_confirmed()
Utility method to constructs a new CommitmentTxConfirmed-variant ClosureReason
-
funding_timed_out
public static ClosureReason funding_timed_out()
Utility method to constructs a new FundingTimedOut-variant ClosureReason
-
processing_error
public static ClosureReason processing_error(String err)
Utility method to constructs a new ProcessingError-variant ClosureReason
-
disconnected_peer
public static ClosureReason disconnected_peer()
Utility method to constructs a new DisconnectedPeer-variant ClosureReason
-
outdated_channel_manager
public static ClosureReason outdated_channel_manager()
Utility method to constructs a new OutdatedChannelManager-variant ClosureReason
-
counterparty_coop_closed_unfunded_channel
public static ClosureReason counterparty_coop_closed_unfunded_channel()
Utility method to constructs a new CounterpartyCoopClosedUnfundedChannel-variant ClosureReason
-
funding_batch_closure
public static ClosureReason funding_batch_closure()
Utility method to constructs a new FundingBatchClosure-variant ClosureReason
-
eq
public boolean eq(ClosureReason b)
Checks if two ClosureReasons contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields.
-
write
public byte[] write()
Serialize the ClosureReason object into a byte array which can be read by ClosureReason_read
-
-