public DriverParameters(boolean isDebug, @NotNull java.nio.file.Path driverDirectory, @NotNull PortAllocation portAllocation, @NotNull PortAllocation debugPortAllocation, @NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties, boolean useTestClock, boolean startNodesInProcess, boolean waitForAllNodesToFinish, @NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs, @NotNull java.util.List<java.lang.String> extraCordappPackagesToScan, @NotNull JmxPolicy jmxPolicy, @NotNull NetworkParameters networkParameters, @NotNull java.util.Map<java.lang.String,? extends java.lang.Object> notaryCustomOverrides, boolean inMemoryDB, @Nullable java.util.Collection<? extends net.corda.testing.node.TestCordapp> cordappsForAllNodes, @Nullable java.nio.file.Path djvmBootstrapSource, @NotNull java.util.List<? extends java.nio.file.Path> djvmCordaSource, @NotNull java.util.Map<java.lang.String,java.lang.String> environmentVariables, boolean allowHibernateToManageAppSchema, boolean premigrateH2Database)
Builder for configuring a driver
.
isDebug
- Indicates whether the spawned nodes should start in jdwt debug mode and have debug level logging.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.systemProperties
- A Map of extra system properties which will be given to each new node. Defaults to empty.useTestClock
- If true the test clock will be used in Node.startNodesInProcess
- Provides the default behaviour of whether new nodes should start inside this process or not. Note that this may be overridden in DriverDSL.startNode
.waitForAllNodesToFinish
- If true, the nodes will not shut down automatically after executing the code in the driver DSL block. It will wait for them to be shut down externally instead.notarySpecs
- The notaries advertised for this network. These nodes will be started automatically and will be available from DriverDSL.notaryHandles
, and will be added automatically to the network parameters. Defaults to a simple validating notary.extraCordappPackagesToScan
- A List of additional cordapp packages to scan for any cordapp code, e.g. contract verification code, flows and services. The calling package is automatically included in this list. If this is not desirable then use cordappsForAllNodes instead.jmxPolicy
- Used to specify whether to expose JMX metrics via Jolokia HHTP/JSON.networkParameters
- The network parameters to be used by all the nodes. NetworkParameters.notaries must be empty as notaries are defined by notarySpecs.notaryCustomOverrides
- Extra settings that need to be passed to the notary.inMemoryDB
- Whether to use in-memory H2 for new nodes rather then on-disk (the node starts quicker, however the data is not persisted between node restarts). Has no effect if node is configured in any way to use database other than H2.cordappsForAllNodes
- class TestCordapp
s that will be added to each node started by the interface DriverDSL
.djvmBootstrapSource
- Location of a JAR containing the Java APIs for the DJVM to use.djvmCordaSource
- Locations of JARs of user-supplied classes to execute within the DJVM sandbox.premigrateH2Database
- Whether to use a prebuilt H2 database schema or start from an empty schema.This can save time for tests which do not need to migrate from a blank schema.driver
public DriverParameters(@NotNull java.util.Collection<? extends net.corda.testing.node.TestCordapp> cordappsForAllNodes)
public DriverParameters(boolean isDebug, @NotNull java.nio.file.Path driverDirectory, @NotNull PortAllocation portAllocation, @NotNull PortAllocation debugPortAllocation, @NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties, boolean useTestClock, boolean startNodesInProcess, boolean waitForAllNodesToFinish, @NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs, @NotNull java.util.List<java.lang.String> extraCordappPackagesToScan, @NotNull JmxPolicy jmxPolicy, @NotNull NetworkParameters networkParameters, @NotNull java.util.Map<java.lang.String,? extends java.lang.Object> notaryCustomOverrides, boolean inMemoryDB, @Nullable java.util.Collection<? extends net.corda.testing.node.TestCordapp> cordappsForAllNodes)
public DriverParameters(boolean isDebug, @NotNull java.nio.file.Path driverDirectory, @NotNull PortAllocation portAllocation, @NotNull PortAllocation debugPortAllocation, @NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties, boolean useTestClock, boolean startNodesInProcess, boolean waitForAllNodesToFinish, @NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs, @NotNull java.util.List<java.lang.String> extraCordappPackagesToScan, @NotNull JmxPolicy jmxPolicy, @NotNull NetworkParameters networkParameters, @NotNull java.util.Map<java.lang.String,? extends java.lang.Object> notaryCustomOverrides, boolean inMemoryDB)
public DriverParameters(boolean isDebug, @NotNull java.nio.file.Path driverDirectory, @NotNull PortAllocation portAllocation, @NotNull PortAllocation debugPortAllocation, @NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties, boolean useTestClock, boolean startNodesInProcess, boolean waitForAllNodesToFinish, @NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs, @NotNull java.util.List<java.lang.String> extraCordappPackagesToScan, @NotNull JmxPolicy jmxPolicy, @NotNull NetworkParameters networkParameters)
public DriverParameters(boolean isDebug, @NotNull java.nio.file.Path driverDirectory, @NotNull PortAllocation portAllocation, @NotNull PortAllocation debugPortAllocation, @NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties, boolean useTestClock, boolean startNodesInProcess, boolean waitForAllNodesToFinish, @NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs, @NotNull java.util.List<java.lang.String> extraCordappPackagesToScan, @NotNull JmxPolicy jmxPolicy, @NotNull NetworkParameters networkParameters, @NotNull java.util.Map<java.lang.String,? extends java.lang.Object> notaryCustomOverrides, boolean inMemoryDB, @Nullable java.util.Collection<? extends net.corda.testing.node.TestCordapp> cordappsForAllNodes, @Nullable java.nio.file.Path djvmBootstrapSource, @NotNull java.util.List<? extends java.nio.file.Path> djvmCordaSource, @NotNull java.util.Map<java.lang.String,java.lang.String> environmentVariables, boolean allowHibernateToManageAppSchema)
public DriverParameters(boolean isDebug, @NotNull java.nio.file.Path driverDirectory, @NotNull PortAllocation portAllocation, @NotNull PortAllocation debugPortAllocation, @NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties, boolean useTestClock, boolean startNodesInProcess, boolean waitForAllNodesToFinish, @NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs, @NotNull java.util.List<java.lang.String> extraCordappPackagesToScan, @NotNull JmxPolicy jmxPolicy, @NotNull NetworkParameters networkParameters, boolean inMemoryDB)
@NotNull public DriverParameters withIsDebug(boolean isDebug)
@NotNull public DriverParameters withDriverDirectory(@NotNull java.nio.file.Path driverDirectory)
@NotNull public DriverParameters withPortAllocation(@NotNull PortAllocation portAllocation)
@NotNull public DriverParameters withDebugPortAllocation(@NotNull PortAllocation debugPortAllocation)
@NotNull public DriverParameters withSystemProperties(@NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties)
@NotNull public DriverParameters withUseTestClock(boolean useTestClock)
@NotNull public DriverParameters withStartNodesInProcess(boolean startNodesInProcess)
@NotNull public DriverParameters withWaitForAllNodesToFinish(boolean waitForAllNodesToFinish)
@NotNull public DriverParameters withNotarySpecs(@NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs)
@Deprecated @NotNull public DriverParameters withExtraCordappPackagesToScan(@NotNull java.util.List<java.lang.String> extraCordappPackagesToScan)
@NotNull public DriverParameters withJmxPolicy(@NotNull JmxPolicy jmxPolicy)
@NotNull public DriverParameters withNetworkParameters(@NotNull NetworkParameters networkParameters)
@NotNull public DriverParameters withNotaryCustomOverrides(@NotNull java.util.Map<java.lang.String,? extends java.lang.Object> notaryCustomOverrides)
@NotNull public DriverParameters withInMemoryDB(boolean inMemoryDB)
@NotNull public DriverParameters withCordappsForAllNodes(@Nullable java.util.Collection<? extends net.corda.testing.node.TestCordapp> cordappsForAllNodes)
@NotNull public DriverParameters withDjvmBootstrapSource(@Nullable java.nio.file.Path djvmBootstrapSource)
@NotNull public DriverParameters withDjvmCordaSource(@NotNull java.util.List<? extends java.nio.file.Path> djvmCordaSource)
@NotNull public DriverParameters withEnvironmentVariables(@NotNull java.util.Map<java.lang.String,java.lang.String> variables)
@NotNull public DriverParameters withAllowHibernateToManageAppSchema(boolean value)
@NotNull public DriverParameters copy(boolean isDebug, @NotNull java.nio.file.Path driverDirectory, @NotNull PortAllocation portAllocation, @NotNull PortAllocation debugPortAllocation, @NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties, boolean useTestClock, boolean startNodesInProcess, boolean waitForAllNodesToFinish, @NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs, @NotNull java.util.List<java.lang.String> extraCordappPackagesToScan, @NotNull JmxPolicy jmxPolicy, @NotNull NetworkParameters networkParameters)
@NotNull public DriverParameters copy(boolean isDebug, @NotNull java.nio.file.Path driverDirectory, @NotNull PortAllocation portAllocation, @NotNull PortAllocation debugPortAllocation, @NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties, boolean useTestClock, boolean startNodesInProcess, boolean waitForAllNodesToFinish, @NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs, @NotNull java.util.List<java.lang.String> extraCordappPackagesToScan, @NotNull JmxPolicy jmxPolicy, @NotNull NetworkParameters networkParameters, @Nullable java.util.Set<? extends net.corda.testing.node.TestCordapp> cordappsForAllNodes)
@NotNull public DriverParameters copy(boolean isDebug, @NotNull java.nio.file.Path driverDirectory, @NotNull PortAllocation portAllocation, @NotNull PortAllocation debugPortAllocation, @NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties, boolean useTestClock, boolean startNodesInProcess, boolean waitForAllNodesToFinish, @NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs, @NotNull java.util.List<java.lang.String> extraCordappPackagesToScan, @NotNull JmxPolicy jmxPolicy, @NotNull NetworkParameters networkParameters, @NotNull java.util.Map<java.lang.String,? extends java.lang.Object> notaryCustomOverrides, boolean inMemoryDB, @Nullable java.util.Collection<? extends net.corda.testing.node.TestCordapp> cordappsForAllNodes)
@NotNull public DriverParameters copy(boolean isDebug, @NotNull java.nio.file.Path driverDirectory, @NotNull PortAllocation portAllocation, @NotNull PortAllocation debugPortAllocation, @NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties, boolean useTestClock, boolean startNodesInProcess, boolean waitForAllNodesToFinish, @NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs, @NotNull java.util.List<java.lang.String> extraCordappPackagesToScan, @NotNull JmxPolicy jmxPolicy, @NotNull NetworkParameters networkParameters, @NotNull java.util.Map<java.lang.String,? extends java.lang.Object> notaryCustomOverrides, boolean inMemoryDB, @Nullable java.util.Collection<? extends net.corda.testing.node.TestCordapp> cordappsForAllNodes, @Nullable java.nio.file.Path djvmBootstrapSource, @NotNull java.util.List<? extends java.nio.file.Path> djvmCordaSource, @NotNull java.util.Map<java.lang.String,java.lang.String> environmentVariables, boolean allowHibernateToManageAppSchema)
public boolean isDebug()
Indicates whether the spawned nodes should start in jdwt debug mode and have debug level logging.
@NotNull public java.nio.file.Path getDriverDirectory()
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
.
DriverDSL.startNode
@NotNull public PortAllocation getPortAllocation()
The port allocation strategy to use for the messaging and the web server addresses.
Defaults to incremental.
@NotNull public PortAllocation getDebugPortAllocation()
The port allocation strategy to use for jvm debugging.
Defaults to incremental.
@NotNull public java.util.Map<java.lang.String,java.lang.String> getSystemProperties()
A Map of extra system properties which will be given to each new node.
Defaults to empty.
public boolean getUseTestClock()
If true the test clock will be used in Node.
public boolean getStartNodesInProcess()
Provides the default behaviour of whether new nodes should start inside this process or
not. Note that this may be overridden in DriverDSL.startNode
.
DriverDSL.startNode
public boolean getWaitForAllNodesToFinish()
If true,
the nodes will not shut down automatically after executing the code in the driver DSL block. It will wait for them to be shut down externally instead.
@NotNull public java.util.List<net.corda.testing.node.NotarySpec> getNotarySpecs()
The notaries advertised for this network.
These nodes will be started automatically and will be available from DriverDSL.notaryHandles
, and will be added automatically to the network parameters. Defaults to a simple validating notary.
DriverDSL.notaryHandles
@NotNull public java.util.List<java.lang.String> getExtraCordappPackagesToScan()
A
List of additional cordapp packages to scan for any cordapp code, e.g. contract verification code, flows and services. The calling package is automatically included in this list. If this is not desirable then use cordappsForAllNodes instead.
@NotNull public JmxPolicy getJmxPolicy()
Used to specify whether to expose JMX metrics via Jolokia HHTP/JSON.
@NotNull public NetworkParameters getNetworkParameters()
The network parameters to be used by all the nodes.
NetworkParameters.notaries must be empty as notaries are defined by notarySpecs.
@NotNull public java.util.Map<java.lang.String,java.lang.Object> getNotaryCustomOverrides()
Extra settings that need to be passed to the notary.
public boolean getInMemoryDB()
Whether to use in-memory H2 for new nodes rather then on-disk
(the node starts quicker, however the data is not persisted between node restarts). Has no effect if node is configured in any way to use database other than H2.
@Nullable public java.util.Collection<net.corda.testing.node.TestCordapp> getCordappsForAllNodes()
s that will be added to each node started by the interface DriverDSL
.
class TestCordapp
,
interface DriverDSL
@Nullable public java.nio.file.Path getDjvmBootstrapSource()
Location of a JAR containing the Java APIs for the DJVM to use.
@NotNull public java.util.List<java.nio.file.Path> getDjvmCordaSource()
Locations of JARs of user-supplied classes to execute within the DJVM sandbox.
@NotNull public java.util.Map<java.lang.String,java.lang.String> getEnvironmentVariables()
public boolean getAllowHibernateToManageAppSchema()
public boolean getPremigrateH2Database()
Whether to use a prebuilt H2 database schema or start from an empty schema.
This can save time for tests which do not need to migrate from a blank schema.
public boolean component1()
Indicates whether the spawned nodes should start in jdwt debug mode and have debug level logging.
@NotNull public java.nio.file.Path component2()
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
.
DriverDSL.startNode
@NotNull public PortAllocation component3()
The port allocation strategy to use for the messaging and the web server addresses.
Defaults to incremental.
@NotNull public PortAllocation component4()
The port allocation strategy to use for jvm debugging.
Defaults to incremental.
@NotNull public java.util.Map<java.lang.String,java.lang.String> component5()
A Map of extra system properties which will be given to each new node.
Defaults to empty.
public boolean component6()
If true the test clock will be used in Node.
public boolean component7()
Provides the default behaviour of whether new nodes should start inside this process or
not. Note that this may be overridden in DriverDSL.startNode
.
DriverDSL.startNode
public boolean component8()
If true,
the nodes will not shut down automatically after executing the code in the driver DSL block. It will wait for them to be shut down externally instead.
@NotNull public java.util.List<net.corda.testing.node.NotarySpec> component9()
The notaries advertised for this network.
These nodes will be started automatically and will be available from DriverDSL.notaryHandles
, and will be added automatically to the network parameters. Defaults to a simple validating notary.
DriverDSL.notaryHandles
@NotNull public java.util.List<java.lang.String> component10()
A
List of additional cordapp packages to scan for any cordapp code, e.g. contract verification code, flows and services. The calling package is automatically included in this list. If this is not desirable then use cordappsForAllNodes instead.
@NotNull public JmxPolicy component11()
Used to specify whether to expose JMX metrics via Jolokia HHTP/JSON.
@NotNull public NetworkParameters component12()
The network parameters to be used by all the nodes.
NetworkParameters.notaries must be empty as notaries are defined by notarySpecs.
@NotNull public java.util.Map<java.lang.String,java.lang.Object> component13()
Extra settings that need to be passed to the notary.
public boolean component14()
Whether to use in-memory H2 for new nodes rather then on-disk
(the node starts quicker, however the data is not persisted between node restarts). Has no effect if node is configured in any way to use database other than H2.
@Nullable public java.util.Collection<net.corda.testing.node.TestCordapp> component15()
s that will be added to each node started by the interface DriverDSL
.
class TestCordapp
,
interface DriverDSL
@Nullable public java.nio.file.Path component16()
Location of a JAR containing the Java APIs for the DJVM to use.
@NotNull public java.util.List<java.nio.file.Path> component17()
Locations of JARs of user-supplied classes to execute within the DJVM sandbox.
@NotNull public java.util.Map<java.lang.String,java.lang.String> component18()
public boolean component19()
public boolean component20()
Whether to use a prebuilt H2 database schema or start from an empty schema.
This can save time for tests which do not need to migrate from a blank schema.
@NotNull public DriverParameters copy(boolean isDebug, @NotNull java.nio.file.Path driverDirectory, @NotNull PortAllocation portAllocation, @NotNull PortAllocation debugPortAllocation, @NotNull java.util.Map<java.lang.String,java.lang.String> systemProperties, boolean useTestClock, boolean startNodesInProcess, boolean waitForAllNodesToFinish, @NotNull java.util.List<net.corda.testing.node.NotarySpec> notarySpecs, @NotNull java.util.List<java.lang.String> extraCordappPackagesToScan, @NotNull JmxPolicy jmxPolicy, @NotNull NetworkParameters networkParameters, @NotNull java.util.Map<java.lang.String,? extends java.lang.Object> notaryCustomOverrides, boolean inMemoryDB, @Nullable java.util.Collection<? extends net.corda.testing.node.TestCordapp> cordappsForAllNodes, @Nullable java.nio.file.Path djvmBootstrapSource, @NotNull java.util.List<? extends java.nio.file.Path> djvmCordaSource, @NotNull java.util.Map<java.lang.String,java.lang.String> environmentVariables, boolean allowHibernateToManageAppSchema, boolean premigrateH2Database)
Builder for configuring a driver
.
driver
@NotNull public java.lang.String toString()
Builder for configuring a driver
.
driver