net.corda.flows

## Class TwoPartyDealFlow.Primary

- FlowLogic
- - net.corda.flows.TwoPartyDealFlow.Primary

- Direct Known Subclasses:
    TwoPartyDealFlow.Instigator
  Enclosing class:
    TwoPartyDealFlow

      public static class TwoPartyDealFlow.Primary
      extends FlowLogic

  Abstracted bilateral deal flow participant that initiates communication/handshake.

  There's a good chance we can push at least some of this logic down into core flow logic and helper methods etc.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Primary.Companion`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Primary.Companion` | `Companion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Primary(ProgressTracker progressTracker)` Abstracted bilateral deal flow participant that initiates communication/handshake.
    `Primary()` Abstracted bilateral deal flow participant that initiates communication/handshake.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SignedTransaction` | `call()` This is where you fill out your business logic. The returned object will usually be ignored, but can be helpful if this flow is meant to be used as a subflow.
    `DigitalSignature.WithKey` | `computeOurSignature(SignedTransaction partialTX)`
    `java.lang.Class<?>` | `getCounterpartyMarker(Party party)` Return the marker Class which party has used to register the counterparty flow that is to execute on the other side. The default implementation returns the class object of this FlowLogic, but any Class instance will do as long as the other side registers with it.
    `java.security.KeyPair` | `getMyKeyPair()`
    `NodeInfo` | `getNotaryNode()`
    `Party` | `getOtherParty()`
    `UntrustworthyData<net.corda.core.transactions.SignedTransaction>` | `getPartialTransaction()`
    `java.lang.Object` | `getPayload()`
    `ProgressTracker` | `getProgressTracker()` Override this to provide a `class ProgressTracker`. If one is provided and stepped, the framework will do something helpful with the progress reports. If this flow is invoked as a subflow of another, then the tracker will be made a child of the current step in the parent. If it's null, this flow doesn't track progress.
    `SignedTransaction` | `verifyPartialTransaction(UntrustworthyData<net.corda.core.transactions.SignedTransaction> untrustedPartialTX)`

    - ### Methods inherited from class net.corda.core.flows.FlowLogic

      `call, getCounterpartyMarker, getLogger, getProgressTracker, getRunId, getServiceHub, getStateMachine, receive, send, sendAndReceive, setStateMachine, subFlow, subFlow, track, waitForLedgerCommit`

- - ### Field Detail

    - #### Companion

          public static Primary.Companion Companion

  - ### Constructor Detail

    - #### Primary

          public Primary(ProgressTracker progressTracker)

      Abstracted bilateral deal flow participant that initiates communication/handshake.

      There's a good chance we can push at least some of this logic down into core flow logic and helper methods etc.

      Parameters:
        `progressTracker` -

        Override this to provide a `class ProgressTracker`. If one is provided and stepped, the framework will do something helpful with the progress reports. If this flow is invoked as a subflow of another, then the tracker will be made a child of the current step in the parent. If it's null, this flow doesn't track progress.

        Note that this has to return a tracker before the flow is invoked. You can't change your mind half way through.

    - #### Primary

          public Primary()

      Abstracted bilateral deal flow participant that initiates communication/handshake.

      There's a good chance we can push at least some of this logic down into core flow logic and helper methods etc.

  - ### Method Detail

    - #### getPayload

          public java.lang.Object getPayload()

    - #### getNotaryNode

          public NodeInfo getNotaryNode()

    - #### getOtherParty

          public Party getOtherParty()

    - #### getMyKeyPair

          public java.security.KeyPair getMyKeyPair()

    - #### getCounterpartyMarker

          public java.lang.Class<?> getCounterpartyMarker(Party party)

      Return the marker Class which party has used to register the counterparty flow that is to execute on the other side. The default implementation returns the class object of this FlowLogic, but any Class instance will do as long as the other side registers with it.

      See Also:
        Class, Class

    - #### getPartialTransaction

          public UntrustworthyData<net.corda.core.transactions.SignedTransaction> getPartialTransaction()

    - #### verifyPartialTransaction

          public SignedTransaction verifyPartialTransaction(UntrustworthyData<net.corda.core.transactions.SignedTransaction> untrustedPartialTX)

    - #### call

          public SignedTransaction call()

      This is where you fill out your business logic. The returned object will usually be ignored, but can be helpful if this flow is meant to be used as a subflow.

    - #### computeOurSignature

          public DigitalSignature.WithKey computeOurSignature(SignedTransaction partialTX)

    - #### getProgressTracker

          public ProgressTracker getProgressTracker()

      Override this to provide a `class ProgressTracker`. If one is provided and stepped, the framework will do something helpful with the progress reports. If this flow is invoked as a subflow of another, then the tracker will be made a child of the current step in the parent. If it's null, this flow doesn't track progress.

      Note that this has to return a tracker before the flow is invoked. You can't change your mind half way through.

      See Also:
        `class ProgressTracker`