Package org.ldk.structs
Class ClosureReason
- java.lang.Object
-
- org.ldk.structs.ClosureReason
-
- Direct Known Subclasses:
ClosureReason.CommitmentTxConfirmed,ClosureReason.CooperativeClosure,ClosureReason.CounterpartyForceClosed,ClosureReason.DisconnectedPeer,ClosureReason.FundingTimedOut,ClosureReason.HolderForceClosed,ClosureReason.OutdatedChannelManager,ClosureReason.ProcessingError
public class ClosureReason extends Object
The reason the channel was closed. See individual variants 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.CounterpartyForceClosedClosure generated from receiving a peer error message.static classClosureReason.DisconnectedPeerThe peer disconnected prior to funding completing.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_force_closed(String peer_msg)Utility method to constructs a new CounterpartyForceClosed-variant ClosureReasonstatic ClosureReasondisconnected_peer()Utility method to constructs a new DisconnectedPeer-variant ClosureReasonprotected voidfinalize()static 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(String 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
-
write
public byte[] write()
Serialize the ClosureReason object into a byte array which can be read by ClosureReason_read
-
-