corda / net.corda.finance.flows / CashPaymentFlow

CashPaymentFlow

@StartableByRPC @InitiatingFlow open class CashPaymentFlow : AbstractCashFlow<Result>

Initiates a flow that sends cash to a recipient.

Parameters

amount - the amount of a currency to pay to the recipient.

recipient - the party to pay the currency to.

issuerConstraint - if specified, the payment will be made using only cash issued by the given parties.

anonymous - whether to anonymous the recipient party. Should be true for normal usage, but may be false

notary - if not specified, the first notary of the network map is selected for testing purposes.

Types

PaymentRequest

class PaymentRequest : AbstractRequest

Constructors

<init>

A straightforward constructor that constructs spends using cash states of any issuer.

CashPaymentFlow(amount: Amount<Currency>, recipient: Party)
CashPaymentFlow(amount: Amount<Currency>, recipient: Party, anonymous: Boolean)CashPaymentFlow(amount: Amount<Currency>, recipient: Party, anonymous: Boolean, notary: Party)
CashPaymentFlow(request: PaymentRequest)

Initiates a flow that sends cash to a recipient.

CashPaymentFlow(amount: Amount<Currency>, recipient: Party, anonymous: Boolean, progressTracker: ProgressTracker, issuerConstraint: Set<Party> = emptySet(), notary: Party? = null)

Properties

amount

the amount of a currency to pay to the recipient.

val amount: Amount<Currency>

anonymous

whether to anonymous the recipient party. Should be true for normal usage, but may be false

val anonymous: Boolean

issuerConstraint

if specified, the payment will be made using only cash issued by the given parties.

val issuerConstraint: Set<Party>

notary

if not specified, the first notary of the network map is selected for testing purposes.

val notary: Party?

recipient

the party to pay the currency to.

val recipient: Party

Functions

call

This is where you fill out your business logic.

open fun call(): Result

Extension Functions

receiveAll

Suspends until a message has been received for each session in the specified sessions.

fun FlowLogic<*>.receiveAll(session: Pair<FlowSession, Class<out Any>>, vararg sessions: Pair<FlowSession, Class<out Any>>): Map<FlowSession, UntrustworthyData<Any>>
fun <R : Any> FlowLogic<*>.receiveAll(receiveType: Class<R>, session: FlowSession, vararg sessions: FlowSession): List<UntrustworthyData<R>>
fun <R : Any> FlowLogic<*>.receiveAll(session: FlowSession, vararg sessions: FlowSession): List<UntrustworthyData<R>>