net.corda.node.services.statemachine

## Class FlowStateMachineImpl<R>

- net.corda.node.services.statemachine.FlowStateMachineImpl<R>

- All Implemented Interfaces:
    FlowStateMachine<R>

      public class FlowStateMachineImpl<R>
      implements FlowStateMachine<R>

- - ### Nested Class Summary

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

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static FlowStateMachineImpl.Companion` | `Companion`
    `ServiceHubInternal` | `serviceHub`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FlowStateMachineImpl(StateMachineRunId id, FlowLogic<? extends R> logic, co.paralleluniverse.fibers.FiberScheduler scheduler)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StateMachineRunId` | `getId()`
    `org.slf4j.Logger` | `getLogger()` Return the logger for this state machine. The logger name incorporates id and so including it in the log message is not necessary.
    `FlowLogic<R>` | `getLogic()`
    `com.google.common.util.concurrent.ListenableFuture<R>` | `getResultFuture()` This future will complete when the call method returns.
    `ServiceHubInternal` | `getServiceHub()`
    `<T> UntrustworthyData<T>` | `receive(java.lang.Class<T> receiveType, Party otherParty, FlowLogic<?> sessionFlow)`
    `void` | `run()`
    `void` | `send(Party otherParty, java.lang.Object payload, FlowLogic<?> sessionFlow)`
    `<T> UntrustworthyData<T>` | `sendAndReceive(java.lang.Class<T> receiveType, Party otherParty, java.lang.Object payload, FlowLogic<?> sessionFlow)`
    `void` | `setServiceHub(ServiceHubInternal p)`
    `SignedTransaction` | `waitForLedgerCommit(SecureHash hash, FlowLogic<?> sessionFlow)`

    - ### Methods inherited from interface net.corda.core.flows.FlowStateMachine

      `getId, getLogger, getResultFuture, getServiceHub, receive, send, sendAndReceive, waitForLedgerCommit`

- - ### Field Detail

    - #### serviceHub

          public ServiceHubInternal serviceHub

    - #### Companion

          public static FlowStateMachineImpl.Companion Companion

  - ### Constructor Detail

    - #### FlowStateMachineImpl

          public FlowStateMachineImpl(StateMachineRunId id,
                                      FlowLogic<? extends R> logic,
                                      co.paralleluniverse.fibers.FiberScheduler scheduler)

  - ### Method Detail

    - #### getServiceHub

          public ServiceHubInternal getServiceHub()

    - #### setServiceHub

          public void setServiceHub(ServiceHubInternal p)

    - #### getLogger

          public org.slf4j.Logger getLogger()

      Return the logger for this state machine. The logger name incorporates id and so including it in the log message is not necessary.

    - #### getResultFuture

          public com.google.common.util.concurrent.ListenableFuture<R> getResultFuture()

      This future will complete when the call method returns.

    - #### run

          public void run()

    - #### sendAndReceive

          public <T> UntrustworthyData<T> sendAndReceive(java.lang.Class<T> receiveType,
                                                         Party otherParty,
                                                         java.lang.Object payload,
                                                         FlowLogic<?> sessionFlow)

    - #### receive

          public <T> UntrustworthyData<T> receive(java.lang.Class<T> receiveType,
                                                  Party otherParty,
                                                  FlowLogic<?> sessionFlow)

    - #### send

          public void send(Party otherParty,
                           java.lang.Object payload,
                           FlowLogic<?> sessionFlow)

    - #### waitForLedgerCommit

          public SignedTransaction waitForLedgerCommit(SecureHash hash,
                                                       FlowLogic<?> sessionFlow)

    - #### getId

          public StateMachineRunId getId()

    - #### getLogic

          public FlowLogic<R> getLogic()