public class NativePaymentChannelServerConnectionEventHandler extends ServerConnectionEventHandler
Modifier and Type | Field and Description |
---|---|
long |
ptr |
Constructor and Description |
---|
NativePaymentChannelServerConnectionEventHandler() |
Modifier and Type | Method and Description |
---|---|
void |
channelClosed(PaymentChannelCloseException.CloseReason reason)
Called when the channel was closed for some reason.
|
void |
channelOpen(Sha256Hash channelId)
Triggered when the channel is opened and application messages/payments can begin
|
void |
paymentIncrease(BigInteger by,
BigInteger to)
Called when the payment in this channel was successfully incremented by the client
|
closeChannel
public NativePaymentChannelServerConnectionEventHandler()
public void channelOpen(Sha256Hash channelId)
ServerConnectionEventHandler
channelOpen
in class ServerConnectionEventHandler
channelId
- A unique identifier which represents this channel (actually the hash of the multisig contract)public void paymentIncrease(BigInteger by, BigInteger to)
ServerConnectionEventHandler
paymentIncrease
in class ServerConnectionEventHandler
by
- The increase in total paymentto
- The new total payment to us (not including fees which may be required to claim the payment)public void channelClosed(PaymentChannelCloseException.CloseReason reason)
ServerConnectionEventHandler
Called when the channel was closed for some reason. May be called without a call to
ServerConnectionEventHandler.channelOpen(Sha256Hash)
.
Note that the same channel can be reopened at any point before it expires if the client reconnects and requests it.
channelClosed
in class ServerConnectionEventHandler
Copyright © 2014. All rights reserved.