net.corda.node.driver

## Class DriverDSL

- net.corda.node.driver.DriverDSL

- All Implemented Interfaces:
    DriverDSLExposedInterface, DriverDSLInternalInterface

      public class DriverDSL
      implements DriverDSLInternalInterface

- - ### Nested Class Summary

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

  - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DriverDSL(PortAllocation portAllocation, PortAllocation debugPortAllocation, java.nio.file.Path driverDirectory, boolean useTestClock, boolean isDebug)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PortAllocation` | `getDebugPortAllocation()`
    `java.nio.file.Path` | `getDriverDirectory()`
    `PortAllocation` | `getPortAllocation()`
    `boolean` | `getUseTestClock()`
    `boolean` | `isDebug()`
    `void` | `registerProcess(com.google.common.util.concurrent.ListenableFuture<java.lang.Process> process)`
    `void` | `shutdown()`
    `void` | `start()`
    `com.google.common.util.concurrent.ListenableFuture<net.corda.node.driver.NodeHandle>` | `startNode(java.lang.String providedName, java.util.Set<net.corda.core.node.services.ServiceInfo> advertisedServices, java.util.List<net.corda.node.services.User> rpcUsers, java.util.Map<java.lang.String,? extends java.lang.Object> customOverrides)` Starts a Node in a separate process.
    `com.google.common.util.concurrent.ListenableFuture<kotlin.Pair>` | `startNotaryCluster(java.lang.String notaryName, int clusterSize, ServiceType type, java.util.List<net.corda.node.services.User> rpcUsers)` Starts a distributed notary cluster.
    `com.google.common.util.concurrent.ListenableFuture<com.google.common.net.HostAndPort>` | `startWebserver(NodeHandle handle)` Starts a web server for a node
    `void` | `waitForAllNodesToFinish()`

    - ### Methods inherited from interface net.corda.node.driver.DriverDSLInternalInterface

      `shutdown, start`

    - ### Methods inherited from interface net.corda.node.driver.DriverDSLExposedInterface

      `startNode, startNotaryCluster, startWebserver, waitForAllNodesToFinish`

- - ### Field Detail

    - #### Companion

          public static DriverDSL.Companion Companion

  - ### Constructor Detail

    - #### DriverDSL

          public DriverDSL(PortAllocation portAllocation,
                           PortAllocation debugPortAllocation,
                           java.nio.file.Path driverDirectory,
                           boolean useTestClock,
                           boolean isDebug)

  - ### Method Detail

    - #### registerProcess

          public void registerProcess(com.google.common.util.concurrent.ListenableFuture<java.lang.Process> process)

    - #### waitForAllNodesToFinish

          public void waitForAllNodesToFinish()

    - #### shutdown

          public void shutdown()

    - #### startNode

          public com.google.common.util.concurrent.ListenableFuture<net.corda.node.driver.NodeHandle> startNode(java.lang.String providedName,
                                                                                                                java.util.Set<net.corda.core.node.services.ServiceInfo> advertisedServices,
                                                                                                                java.util.List<net.corda.node.services.User> rpcUsers,
                                                                                                                java.util.Map<java.lang.String,? extends java.lang.Object> customOverrides)

      Starts a Node in a separate process.

      Parameters:
        `providedName` - Optional name of the node, which will be its legal name in `class Party`. Defaults to something random. Note that this must be unique as the driver uses it as a primary key!
        `advertisedServices` - The set of services to be advertised by the node. Defaults to empty set.
        `rpcUsers` - List of users who are authorised to use the RPC system. Defaults to empty list.
      Returns:
        The `class NodeInfo` of the started up node retrieved from the network map service.
      See Also:
        Node

    - #### startNotaryCluster

          public com.google.common.util.concurrent.ListenableFuture<kotlin.Pair> startNotaryCluster(java.lang.String notaryName,
                                                                                                    int clusterSize,
                                                                                                    ServiceType type,
                                                                                                    java.util.List<net.corda.node.services.User> rpcUsers)

      Starts a distributed notary cluster.

      Parameters:
        `notaryName` - The legal name of the advertised distributed notary service.
        `clusterSize` - Number of nodes to create for the cluster.
        `type` - The advertised notary service type. Currently the only supported type is RaftValidatingNotaryService.type.
        `rpcUsers` - List of users who are authorised to use the RPC system. Defaults to empty list.
      Returns:
        The `class Party` identity of the distributed notary service, and the `class NodeInfo`s of the notaries in the cluster.

    - #### startWebserver

          public com.google.common.util.concurrent.ListenableFuture<com.google.common.net.HostAndPort> startWebserver(NodeHandle handle)

      Starts a web server for a node

      Parameters:
        `handle` - The handle for the node that this webserver connects to via RPC.

    - #### start

          public void start()

    - #### getPortAllocation

          public PortAllocation getPortAllocation()

    - #### getDebugPortAllocation

          public PortAllocation getDebugPortAllocation()

    - #### getDriverDirectory

          public java.nio.file.Path getDriverDirectory()

    - #### getUseTestClock

          public boolean getUseTestClock()

    - #### isDebug

          public boolean isDebug()