AbstractStateReplacementFlow.Acceptor
Keywords: net.corda.core.flows.AbstractStateReplacementFlow.Acceptor class
Date: 2023-09-18

net.corda.core.flows

## Class AbstractStateReplacementFlow.Acceptor<T>

- net.corda.core.flows.FlowLogic<T>
- - net.corda.core.flows.AbstractStateReplacementFlow.Acceptor<T>

- Enclosing class:
    AbstractStateReplacementFlow

      public static class AbstractStateReplacementFlow.Acceptor<T>
      extends FlowLogic<T>

- - ### Field Detail

    - #### Companion

          public static net.corda.core.flows.AbstractStateReplacementFlow.Acceptor.Companion Companion

  - ### Constructor Detail

    - #### Acceptor

          public Acceptor(@NotNull
                          FlowSession initiatingSession,
                          @NotNull
                          ProgressTracker progressTracker)

      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 e.g record to the audit service. 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.

    - #### Acceptor

          public Acceptor(@NotNull
                          FlowSession initiatingSession)

  - ### Method Detail

    - #### call

          @Suspendable
           @Nullable
          public java.lang.Void call()

      This is where you fill out your business logic.

    - #### verifyProposal

          protected void verifyProposal(@NotNull
                                        SignedTransaction stx,
                                        @NotNull
                                        net.corda.core.flows.AbstractStateReplacementFlow.Proposal<? extends T> proposal)

      Check the state change proposal and the signed transaction to confirm that it's acceptable to this node. Rules for verification depend on the change proposed, and may further depend on the node itself (for example configuration). The proposal is returned if acceptable, otherwise a `exception StateReplacementException` is thrown.

      See Also:
        `exception StateReplacementException`

    - #### getInitiatingSession

          @NotNull
          public FlowSession getInitiatingSession()

    - #### getProgressTracker

          @NotNull
          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 e.g record to the audit service. 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`