public static interface PaymentChannelServer.ServerConnection
Modifier and Type | Method and Description |
---|---|
void |
channelOpen(Sha256Hash contractHash)
Triggered when the channel is opened and payments can begin
|
void |
destroyConnection(PaymentChannelCloseException.CloseReason reason)
Requests that the connection to the client be closed
|
void |
paymentIncrease(BigInteger by,
BigInteger to)
Called when the payment in this channel was successfully incremented by the client
|
void |
sendToClient(Protos.TwoWayChannelMessage msg)
Requests that the given message be sent to the client.
|
void sendToClient(Protos.TwoWayChannelMessage msg)
Requests that the given message be sent to the client. There are no blocking requirements for this method, however the order of messages must be preserved.
If the send fails, no exception should be thrown, however
PaymentChannelServer.connectionClosed()
should be called immediately.
Called while holding a lock on the PaymentChannelServer
object - be careful about reentrancy
void destroyConnection(PaymentChannelCloseException.CloseReason reason)
Requests that the connection to the client be closed
Called while holding a lock on the PaymentChannelServer
object - be careful about reentrancy
reason
- The reason for the closure, see the individual values for more details.
It is usually safe to ignore this value.void channelOpen(Sha256Hash contractHash)
Triggered when the channel is opened and payments can begin
Called while holding a lock on the PaymentChannelServer
object - be careful about reentrancy
contractHash
- A unique identifier which represents this channel (actually the hash of the multisig contract)void paymentIncrease(BigInteger by, BigInteger to)
Called when the payment in this channel was successfully incremented by the client
Called while holding a lock on the PaymentChannelServer
object - be careful about reentrancy
by
- The increase in total paymentto
- The new total payment to us (not including fees which may be required to claim the payment)Copyright © 2014. All rights reserved.