net.corda.flows

## Class NotaryFlow.Service

- FlowLogic
- - net.corda.flows.NotaryFlow.Service

- Direct Known Subclasses:
    NonValidatingNotaryFlow, ValidatingNotaryFlow
  Enclosing class:
    NotaryFlow

      public static class NotaryFlow.Service
      extends FlowLogic

  A flow run by a notary service that handles notarisation requests.

  It checks that the timestamp command is valid (if present) and commits the input state, or returns a conflict if any of the input states have been previously committed.

  Additional transaction validation logic can be added when implementing `NotaryFlow.Service.receiveAndVerifyTx`.

  See Also:
    `NotaryFlow.Service.receiveAndVerifyTx`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Service.TransactionParts` The minimum amount of information needed to notarise a transaction. Note that this does not include any sensitive transaction details.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Service(Party otherSide, TimestampChecker timestampChecker, UniquenessProvider uniquenessProvider)` A flow run by a notary service that handles notarisation requests.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Void` | `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.
    `Party` | `getOtherSide()`
    `TimestampChecker` | `getTimestampChecker()`
    `UniquenessProvider` | `getUniquenessProvider()`
    `Service.TransactionParts` | `receiveAndVerifyTx()` Implement custom logic to receive the transaction to notarise, and perform verification based on validity and privacy requirements.

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

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

- - ### Constructor Detail

    - #### Service

          public Service(Party otherSide,
                         TimestampChecker timestampChecker,
                         UniquenessProvider uniquenessProvider)

      A flow run by a notary service that handles notarisation requests.

      It checks that the timestamp command is valid (if present) and commits the input state, or returns a conflict if any of the input states have been previously committed.

      Additional transaction validation logic can be added when implementing `NotaryFlow.Service.receiveAndVerifyTx`.

      See Also:
        `NotaryFlow.Service.receiveAndVerifyTx`

  - ### Method Detail

    - #### call

          public java.lang.Void 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.

    - #### receiveAndVerifyTx

          public Service.TransactionParts receiveAndVerifyTx()

      Implement custom logic to receive the transaction to notarise, and perform verification based on validity and privacy requirements.

    - #### getOtherSide

          public Party getOtherSide()

    - #### getTimestampChecker

          public TimestampChecker getTimestampChecker()

    - #### getUniquenessProvider

          public UniquenessProvider getUniquenessProvider()