net.corda.node.driver / driver

# driver

`fun <A> driver(driverDirectory: Path = Paths.get("build", getTimestampAsDirectoryName()), portAllocation: PortAllocation = PortAllocation.Incremental(10000), debugPortAllocation: PortAllocation = PortAllocation.Incremental(5005), useTestClock: Boolean = false, isDebug: Boolean = false, dsl: DriverDSLExposedInterface.() -> A): A`

driver allows one to start up nodes like this: driver { val noService = startNode("NoService") val notary = startNode("Notary")

(...) }

Note that DriverDSL.startNode does not wait for the node to start up synchronously, but rather returns a Future of the NodeInfo that may be waited on, which completes when the new node registered with the network map service.

The driver implicitly bootstraps a NetworkMapService that may be accessed through a local cache DriverDSL.networkMapCache.

### Parameters

`driverDirectory` - The base directory node directories go into, defaults to "build//". The node directories themselves are "//", where legalName defaults to "-" and may be specified in DriverDSL.startNode.
`portAllocation` - The port allocation strategy to use for the messaging and the web server addresses. Defaults to incremental.
`debugPortAllocation` - The port allocation strategy to use for jvm debugging. Defaults to incremental.
`useTestClock` - If true the test clock will be used in Node.
`isDebug` - Indicates whether the spawned nodes should start in jdwt debug mode.
`dsl` - The dsl itself.

Return
The value returned in the dsl closure.