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
|
ListenableFuture<com.google.protobuf.ByteString> |
paymentIncrease(Coin by,
Coin to,
com.google.protobuf.ByteString info)
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)@Nullable ListenableFuture<com.google.protobuf.ByteString> paymentIncrease(Coin by, Coin to, @Nullable com.google.protobuf.ByteString info)
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)info
- Information about this payment increase, used to extend this protocol.Copyright © 2016. All rights reserved.