data class DriverParameters
Builder for configuring a driver.
DriverParameters(cordappsForAllNodes: Collection<TestCordapp>) DriverParameters(isDebug: Boolean = false, driverDirectory: Path = Paths.get("build") / "node-driver" / getTimestampAsDirectoryName(), portAllocation: PortAllocation = incrementalPortAllocation(), debugPortAllocation: PortAllocation = incrementalPortAllocation(), systemProperties: Map<String, String> = emptyMap(), useTestClock: Boolean = false, startNodesInProcess: Boolean = false, waitForAllNodesToFinish: Boolean = false, notarySpecs: List<NotarySpec> = listOf(NotarySpec(DUMMY_NOTARY_NAME)), extraCordappPackagesToScan: List<String> = emptyList(), jmxPolicy: JmxPolicy = JmxPolicy(), networkParameters: NetworkParameters = testNetworkParameters(notaries = emptyList()), notaryCustomOverrides: Map<String, Any?> = emptyMap(), inMemoryDB: Boolean = true, cordappsForAllNodes: Collection<TestCordapp>? = null) DriverParameters(isDebug: Boolean = false, driverDirectory: Path = Paths.get("build") / "node-driver" / getTimestampAsDirectoryName(), portAllocation: PortAllocation = incrementalPortAllocation(), debugPortAllocation: PortAllocation = incrementalPortAllocation(), systemProperties: Map<String, String> = emptyMap(), useTestClock: Boolean = false, startNodesInProcess: Boolean = false, waitForAllNodesToFinish: Boolean = false, notarySpecs: List<NotarySpec> = listOf(NotarySpec(DUMMY_NOTARY_NAME)), extraCordappPackagesToScan: List<String> = emptyList(), jmxPolicy: JmxPolicy = JmxPolicy(), networkParameters: NetworkParameters = testNetworkParameters(notaries = emptyList()), notaryCustomOverrides: Map<String, Any?> = emptyMap(), inMemoryDB: Boolean = true) DriverParameters(isDebug: Boolean, driverDirectory: Path, portAllocation: PortAllocation, debugPortAllocation: PortAllocation, systemProperties: Map<String, String>, useTestClock: Boolean, startNodesInProcess: Boolean, waitForAllNodesToFinish: Boolean, notarySpecs: List<NotarySpec>, extraCordappPackagesToScan: List<String>, jmxPolicy: JmxPolicy, networkParameters: NetworkParameters) DriverParameters(isDebug: Boolean = false, driverDirectory: Path = Paths.get("build") / "node-driver" / getTimestampAsDirectoryName(), portAllocation: PortAllocation = incrementalPortAllocation(), debugPortAllocation: PortAllocation = incrementalPortAllocation(), systemProperties: Map<String, String> = emptyMap(), useTestClock: Boolean = false, startNodesInProcess: Boolean = false, waitForAllNodesToFinish: Boolean = false, notarySpecs: List<NotarySpec> = listOf(NotarySpec(DUMMY_NOTARY_NAME)), extraCordappPackagesToScan: List<String> = emptyList(), jmxPolicy: JmxPolicy = JmxPolicy(), networkParameters: NetworkParameters = testNetworkParameters(notaries = emptyList()), notaryCustomOverrides: Map<String, Any?> = emptyMap(), inMemoryDB: Boolean = false, cordappsForAllNodes: Collection<TestCordapp>? = null, djvmBootstrapSource: Path? = null, djvmCordaSource: List<Path> = emptyList(), environmentVariables: Map<String, String> = emptyMap(), allowHibernateToManageAppSchema: Boolean = true) DriverParameters(isDebug: Boolean, driverDirectory: Path, portAllocation: PortAllocation, debugPortAllocation: PortAllocation, systemProperties: Map<String, String>, useTestClock: Boolean, startNodesInProcess: Boolean, waitForAllNodesToFinish: Boolean, notarySpecs: List<NotarySpec>, extraCordappPackagesToScan: List<String>, jmxPolicy: JmxPolicy, networkParameters: NetworkParameters, inMemoryDB: Boolean) DriverParameters(isDebug: Boolean = false, driverDirectory: Path = Paths.get("build") / "node-driver" / getTimestampAsDirectoryName(), portAllocation: PortAllocation = incrementalPortAllocation(), debugPortAllocation: PortAllocation = incrementalPortAllocation(), systemProperties: Map<String, String> = emptyMap(), useTestClock: Boolean = false, startNodesInProcess: Boolean = false, waitForAllNodesToFinish: Boolean = false, notarySpecs: List<NotarySpec> = listOf(NotarySpec(DUMMY_NOTARY_NAME)), extraCordappPackagesToScan: List<String> = emptyList(), jmxPolicy: JmxPolicy = JmxPolicy(), networkParameters: NetworkParameters = testNetworkParameters(notaries = emptyList()), notaryCustomOverrides: Map<String, Any?> = emptyMap(), inMemoryDB: Boolean = false, cordappsForAllNodes: Collection<TestCordapp>? = null, djvmBootstrapSource: Path? = null, djvmCordaSource: List<Path> = emptyList(), environmentVariables: Map<String, String> = emptyMap(), allowHibernateToManageAppSchema: Boolean = true, premigrateH2Database: Boolean = true)
Builder for configuring a driver. |
val allowHibernateToManageAppSchema: Boolean |
|
val cordappsForAllNodes: Collection<TestCordapp>?
TestCordapps that will be added to each node started by the DriverDSL. |
|
val debugPortAllocation: PortAllocation
The port allocation strategy to use for jvm debugging. Defaults to incremental. |
|
val djvmBootstrapSource: Path?
Location of a JAR containing the Java APIs for the DJVM to use. |
|
val djvmCordaSource: List<Path>
Locations of JARs of user-supplied classes to execute within the DJVM sandbox. |
|
val driverDirectory: Path
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. |
|
val environmentVariables: Map<String, String> |
|
val
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. |
|
val inMemoryDB: Boolean
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. |
|
val isDebug: Boolean
Indicates whether the spawned nodes should start in jdwt debug mode and have debug level logging. |
|
val jmxPolicy: JmxPolicy
Used to specify whether to expose JMX metrics via Jolokia HHTP/JSON. |
|
val networkParameters: NetworkParameters
The network parameters to be used by all the nodes. NetworkParameters.notaries must be empty as notaries are defined by notarySpecs. |
|
val notaryCustomOverrides: Map<String, Any?>
Extra settings that need to be passed to the notary. |
|
val notarySpecs: List<NotarySpec>
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. |
|
val portAllocation: PortAllocation
The port allocation strategy to use for the messaging and the web server addresses. Defaults to incremental. |
|
val premigrateH2Database: Boolean
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. |
|
val startNodesInProcess: Boolean
Provides the default behaviour of whether new nodes should start inside this process or not. Note that this may be overridden in DriverDSL.startNode. |
|
val systemProperties: Map<String, String>
A Map of extra system properties which will be given to each new node. Defaults to empty. |
|
val useTestClock: Boolean
If true the test clock will be used in Node. |
|
val waitForAllNodesToFinish: Boolean
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. |
fun copy(isDebug: Boolean, driverDirectory: Path, portAllocation: PortAllocation, debugPortAllocation: PortAllocation, systemProperties: Map<String, String>, useTestClock: Boolean, startNodesInProcess: Boolean, waitForAllNodesToFinish: Boolean, notarySpecs: List<NotarySpec>, extraCordappPackagesToScan: List<String>, jmxPolicy: JmxPolicy, networkParameters: NetworkParameters): DriverParameters fun copy(isDebug: Boolean, driverDirectory: Path, portAllocation: PortAllocation, debugPortAllocation: PortAllocation, systemProperties: Map<String, String>, useTestClock: Boolean, startNodesInProcess: Boolean, waitForAllNodesToFinish: Boolean, notarySpecs: List<NotarySpec>, extraCordappPackagesToScan: List<String>, jmxPolicy: JmxPolicy, networkParameters: NetworkParameters, cordappsForAllNodes: Set<TestCordapp>?): DriverParameters fun copy(isDebug: Boolean, driverDirectory: Path, portAllocation: PortAllocation, debugPortAllocation: PortAllocation, systemProperties: Map<String, String>, useTestClock: Boolean, startNodesInProcess: Boolean, waitForAllNodesToFinish: Boolean, notarySpecs: List<NotarySpec>, extraCordappPackagesToScan: List<String>, jmxPolicy: JmxPolicy, networkParameters: NetworkParameters, notaryCustomOverrides: Map<String, Any?>, inMemoryDB: Boolean, cordappsForAllNodes: Collection<TestCordapp>?): DriverParameters fun copy(isDebug: Boolean, driverDirectory: Path, portAllocation: PortAllocation, debugPortAllocation: PortAllocation, systemProperties: Map<String, String>, useTestClock: Boolean, startNodesInProcess: Boolean, waitForAllNodesToFinish: Boolean, notarySpecs: List<NotarySpec>, extraCordappPackagesToScan: List<String>, jmxPolicy: JmxPolicy, networkParameters: NetworkParameters, notaryCustomOverrides: Map<String, Any?>, inMemoryDB: Boolean, cordappsForAllNodes: Collection<TestCordapp>?, djvmBootstrapSource: Path?, djvmCordaSource: List<Path>, environmentVariables: Map<String, String>, allowHibernateToManageAppSchema: Boolean): DriverParameters |
|
fun withAllowHibernateToManageAppSchema(value: Boolean): DriverParameters |
|
fun withCordappsForAllNodes(cordappsForAllNodes: Collection<TestCordapp>?): DriverParameters |
|
fun withDebugPortAllocation(debugPortAllocation: PortAllocation): DriverParameters |
|
fun withDjvmBootstrapSource(djvmBootstrapSource: Path?): DriverParameters |
|
fun withDjvmCordaSource(djvmCordaSource: List<Path>): DriverParameters |
|
fun withDriverDirectory(driverDirectory: Path): DriverParameters |
|
fun withEnvironmentVariables(variables: Map<String, String>): DriverParameters |
|
fun |
|
fun withInMemoryDB(inMemoryDB: Boolean): DriverParameters |
|
fun withIsDebug(isDebug: Boolean): DriverParameters |
|
fun withJmxPolicy(jmxPolicy: JmxPolicy): DriverParameters |
|
fun withNetworkParameters(networkParameters: NetworkParameters): DriverParameters |
|
fun withNotaryCustomOverrides(notaryCustomOverrides: Map<String, Any?>): DriverParameters |
|
fun withNotarySpecs(notarySpecs: List<NotarySpec>): DriverParameters |
|
fun withPortAllocation(portAllocation: PortAllocation): DriverParameters |
|
fun withStartNodesInProcess(startNodesInProcess: Boolean): DriverParameters |
|
fun withSystemProperties(systemProperties: Map<String, String>): DriverParameters |
|
fun withUseTestClock(useTestClock: Boolean): DriverParameters |
|
fun withWaitForAllNodesToFinish(waitForAllNodesToFinish: Boolean): DriverParameters |
fun Any.contextLogger(): <ERROR CLASS>
When called from a companion object, returns the logger for the enclosing class. |