MockNodeParameters
Keywords: net.corda.testing.node.MockNodeParameters class
Date: 2023-09-18

net.corda.testing.node

## Class MockNodeParameters

- net.corda.testing.node.MockNodeParameters

-     public class MockNodeParameters

  Immutable builder for configuring a `class StartedMockNode` or an `class UnstartedMockNode` via `MockNetwork.createNode` and `MockNetwork.createUnstartedNode`. Kotlin users can also use the named parameters overloads of those methods which are more convenient.

  See Also:
    `class StartedMockNode`, `class UnstartedMockNode`, `MockNetwork.createNode`, `MockNetwork.createUnstartedNode`

- - ### Constructor Detail

    - #### MockNodeParameters

          public MockNodeParameters(@Nullable
                                    java.lang.Integer forcedID,
                                    @Nullable
                                    CordaX500Name legalName,
                                    @NotNull
                                    java.math.BigInteger entropyRoot,
                                    @Nullable
                                    MockNodeConfigOverrides configOverrides,
                                    @NotNull
                                    java.util.Collection<? extends net.corda.testing.node.TestCordapp> additionalCordapps)

      Immutable builder for configuring a `class StartedMockNode` or an `class UnstartedMockNode` via `MockNetwork.createNode` and `MockNetwork.createUnstartedNode`. Kotlin users can also use the named parameters overloads of those methods which are more convenient.

      Parameters:
        `forcedID` - Override the ID to use for the node. By default node ID's are generated sequentially in a`class MockNetwork`. Specifying the same ID is required if a node is restarted.
        `legalName` - The `class CordaX500Name` name to use for the node.
        `entropyRoot` - the initial entropy value to use when generating keys. Defaults to an (insecure) random value,but can be overridden to cause nodes to have stable or colliding identity/service keys.
        `configOverrides` - Add/override behaviour of the NodeConfiguration mock object.
        `additionalCordapps` - `class TestCordapp`s that will be added to this node in addition to the ones shared by all nodes, which get specified at `class MockNetwork` level.
      See Also:
        `class StartedMockNode`, `class UnstartedMockNode`, `MockNetwork.createNode`, `MockNetwork.createUnstartedNode`

    - #### MockNodeParameters

          public MockNodeParameters()

      Immutable builder for configuring a `class StartedMockNode` or an `class UnstartedMockNode` via `MockNetwork.createNode` and `MockNetwork.createUnstartedNode`. Kotlin users can also use the named parameters overloads of those methods which are more convenient.

      See Also:
        `class StartedMockNode`, `class UnstartedMockNode`, `MockNetwork.createNode`, `MockNetwork.createUnstartedNode`

    - #### MockNodeParameters

          public MockNodeParameters(@Nullable
                                    java.lang.Integer forcedID,
                                    @Nullable
                                    CordaX500Name legalName,
                                    @NotNull
                                    java.math.BigInteger entropyRoot,
                                    @NotNull
                                    MockNodeConfigOverrides configOverrides)

  - ### Method Detail

    - #### withForcedID

          @NotNull
          public MockNodeParameters withForcedID(@Nullable
                                                          java.lang.Integer forcedID)

    - #### withLegalName

          @NotNull
          public MockNodeParameters withLegalName(@Nullable
                                                           CordaX500Name legalName)

    - #### withEntropyRoot

          @NotNull
          public MockNodeParameters withEntropyRoot(@NotNull
                                                             java.math.BigInteger entropyRoot)

    - #### withConfigOverrides

          @NotNull
          public MockNodeParameters withConfigOverrides(@NotNull
                                                                 MockNodeConfigOverrides configOverrides)

    - #### withAdditionalCordapps

          @NotNull
          public MockNodeParameters withAdditionalCordapps(@NotNull
                                                                    java.util.Collection<? extends net.corda.testing.node.TestCordapp> additionalCordapps)

    - #### copy

          @NotNull
          public MockNodeParameters copy(@Nullable
                                                  java.lang.Integer forcedID,
                                                  @Nullable
                                                  CordaX500Name legalName,
                                                  @NotNull
                                                  java.math.BigInteger entropyRoot,
                                                  @NotNull
                                                  MockNodeConfigOverrides configOverrides)

    - #### getForcedID

          @Nullable
          public java.lang.Integer getForcedID()

      Override the ID to use for the node.

      By default node ID's are generated sequentially in a`class MockNetwork`. Specifying the same ID is required if a node is restarted.

      See Also:
        `class MockNetwork`

    - #### getLegalName

          @Nullable
          public CordaX500Name getLegalName()

      The

      `class CordaX500Name` name to use for the node.

      See Also:
        `class CordaX500Name`

    - #### getEntropyRoot

          @NotNull
          public java.math.BigInteger getEntropyRoot()

      the initial entropy value to use when generating keys.

      Defaults to an (insecure) random value,but can be overridden to cause nodes to have stable or colliding identity/service keys.

    - #### getConfigOverrides

          @Nullable
          public MockNodeConfigOverrides getConfigOverrides()

      Add/override behaviour of the

      NodeConfiguration mock object.

    - #### getAdditionalCordapps

          @NotNull
          public java.util.Collection<net.corda.testing.node.TestCordapp> getAdditionalCordapps()

      `class TestCordapp`

      s that will be added to this node in addition to the ones shared by all nodes, which get specified at `class MockNetwork` level.

      See Also:
        `class TestCordapp`, `class MockNetwork`

    - #### component1

          @Nullable
          public java.lang.Integer component1()

      Override the ID to use for the node.

      By default node ID's are generated sequentially in a`class MockNetwork`. Specifying the same ID is required if a node is restarted.

      See Also:
        `class MockNetwork`

    - #### component2

          @Nullable
          public CordaX500Name component2()

      The

      `class CordaX500Name` name to use for the node.

      See Also:
        `class CordaX500Name`

    - #### component3

          @NotNull
          public java.math.BigInteger component3()

      the initial entropy value to use when generating keys.

      Defaults to an (insecure) random value,but can be overridden to cause nodes to have stable or colliding identity/service keys.

    - #### component4

          @Nullable
          public MockNodeConfigOverrides component4()

      Add/override behaviour of the

      NodeConfiguration mock object.

    - #### component5

          @NotNull
          public java.util.Collection<net.corda.testing.node.TestCordapp> component5()

      `class TestCordapp`

      s that will be added to this node in addition to the ones shared by all nodes, which get specified at `class MockNetwork` level.

      See Also:
        `class TestCordapp`, `class MockNetwork`

    - #### copy

          @NotNull
          public MockNodeParameters copy(@Nullable
                                                  java.lang.Integer forcedID,
                                                  @Nullable
                                                  CordaX500Name legalName,
                                                  @NotNull
                                                  java.math.BigInteger entropyRoot,
                                                  @Nullable
                                                  MockNodeConfigOverrides configOverrides,
                                                  @NotNull
                                                  java.util.Collection<? extends net.corda.testing.node.TestCordapp> additionalCordapps)

      Immutable builder for configuring a `class StartedMockNode` or an `class UnstartedMockNode` via `MockNetwork.createNode` and `MockNetwork.createUnstartedNode`. Kotlin users can also use the named parameters overloads of those methods which are more convenient.

      See Also:
        `class StartedMockNode`, `class UnstartedMockNode`, `MockNetwork.createNode`, `MockNetwork.createUnstartedNode`

    - #### toString

          @NotNull
          public java.lang.String toString()

      Immutable builder for configuring a `class StartedMockNode` or an `class UnstartedMockNode` via `MockNetwork.createNode` and `MockNetwork.createUnstartedNode`. Kotlin users can also use the named parameters overloads of those methods which are more convenient.

      See Also:
        `class StartedMockNode`, `class UnstartedMockNode`, `MockNetwork.createNode`, `MockNetwork.createUnstartedNode`

    - #### hashCode

          public int hashCode()

      Immutable builder for configuring a `class StartedMockNode` or an `class UnstartedMockNode` via `MockNetwork.createNode` and `MockNetwork.createUnstartedNode`. Kotlin users can also use the named parameters overloads of those methods which are more convenient.

      See Also:
        `class StartedMockNode`, `class UnstartedMockNode`, `MockNetwork.createNode`, `MockNetwork.createUnstartedNode`

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object p)

      Immutable builder for configuring a `class StartedMockNode` or an `class UnstartedMockNode` via `MockNetwork.createNode` and `MockNetwork.createUnstartedNode`. Kotlin users can also use the named parameters overloads of those methods which are more convenient.

      See Also:
        `class StartedMockNode`, `class UnstartedMockNode`, `MockNetwork.createNode`, `MockNetwork.createUnstartedNode`