public DriverDSL
Underlying interface for the driver DSL. Do not instantiate directly, instead use the Driver.driver
function.
Driver.driver
Modifier and Type | Interface and Description |
---|---|
static class |
DriverDSL.DefaultImpls
Underlying interface for the driver DSL. Do not instantiate directly, instead use the
Driver.driver function. |
Modifier and Type | Method and Description |
---|---|
java.nio.file.Path |
baseDirectory(CordaX500Name nodeName)
Returns the base directory for a node with the given
class CordaX500Name . This method is useful if the base directory
is needed before the node is started. |
NotaryHandle |
getDefaultNotaryHandle()
Returns the
class NotaryHandle for the single notary on the network. Throws if there are none or more than one. |
Party |
getDefaultNotaryIdentity()
Returns the identity of the single notary on the network. Throws if there are none or more than one.
|
CordaFuture<net.corda.testing.driver.NodeHandle> |
getDefaultNotaryNode()
Returns a
interface CordaFuture on the interface NodeHandle for the single-node notary on the network. Throws if there
are no notaries or more than one, or if the notary is a distributed cluster. |
java.util.List<net.corda.testing.driver.NotaryHandle> |
getNotaryHandles()
Returns a list of
class NotaryHandle s matching the list of class NotarySpec s passed into Driver.driver . |
int |
nextPort()
Returns the next port to use when instantiating test processes that must not conflict on the same machine
|
CordaFuture<net.corda.testing.driver.NodeHandle> |
startNode()
Start a node using the default values of
class NodeParameters . |
CordaFuture<net.corda.testing.driver.NodeHandle> |
startNode(NodeParameters parameters)
Start a node using the parameter values of the given
class NodeParameters . |
CordaFuture<net.corda.testing.driver.NodeHandle> |
startNode(NodeParameters defaultParameters,
CordaX500Name providedName,
java.util.List<net.corda.testing.node.User> rpcUsers,
VerifierType verifierType,
java.util.Map<java.lang.String,? extends java.lang.Object> customOverrides,
java.lang.Boolean startInSameProcess,
java.lang.String maximumHeapSize,
java.lang.String logLevelOverride)
Start a node.
|
CordaFuture<net.corda.testing.driver.NodeHandle> |
startNode(NodeParameters defaultParameters,
CordaX500Name providedName,
java.util.List<net.corda.testing.node.User> rpcUsers,
VerifierType verifierType,
java.util.Map<java.lang.String,? extends java.lang.Object> customOverrides,
java.lang.Boolean startInSameProcess,
java.lang.String maximumHeapSize)
Start a node.
|
CordaFuture<net.corda.testing.driver.WebserverHandle> |
startWebserver(NodeHandle handle)
Call
DriverDSL.startWebserver with a default maximumHeapSize. |
CordaFuture<net.corda.testing.driver.WebserverHandle> |
startWebserver(NodeHandle handle,
java.lang.String maximumHeapSize)
Starts a web server for a node
|
java.util.List<net.corda.testing.driver.NotaryHandle> getNotaryHandles()
Returns a list of class NotaryHandle
s matching the list of class NotarySpec
s passed into Driver.driver
.
class NotaryHandle
,
class NotarySpec
,
Driver.driver
NotaryHandle getDefaultNotaryHandle()
Returns the class NotaryHandle
for the single notary on the network. Throws if there are none or more than one.
class NotaryHandle
,
DriverDSL.getNotaryHandles
Party getDefaultNotaryIdentity()
Returns the identity of the single notary on the network. Throws if there are none or more than one.
DriverDSL.getDefaultNotaryHandle
CordaFuture<net.corda.testing.driver.NodeHandle> getDefaultNotaryNode()
Returns a interface CordaFuture
on the interface NodeHandle
for the single-node notary on the network. Throws if there
are no notaries or more than one, or if the notary is a distributed cluster.
CordaFuture<net.corda.testing.driver.NodeHandle> startNode()
Start a node using the default values of class NodeParameters
.
interface CordaFuture
on the interface NodeHandle
to the node. The future will complete when the node is available and
it sees all previously started nodes, including the notaries.class NodeParameters
CordaFuture<net.corda.testing.driver.NodeHandle> startNode(NodeParameters parameters)
Start a node using the parameter values of the given class NodeParameters
.
parameters
- The node parameters.interface CordaFuture
on the interface NodeHandle
to the node. The future will complete when the node is available and
it sees all previously started nodes, including the notaries.class NodeParameters
CordaFuture<net.corda.testing.driver.NodeHandle> startNode(NodeParameters defaultParameters, CordaX500Name providedName, java.util.List<net.corda.testing.node.User> rpcUsers, VerifierType verifierType, java.util.Map<java.lang.String,? extends java.lang.Object> customOverrides, java.lang.Boolean startInSameProcess, java.lang.String maximumHeapSize, java.lang.String logLevelOverride)
Start a node.
NOTE: This method does not provide all the node parameters that are available and only exists for backwards compatibility. It is
recommended you use class NodeParameters
.
defaultParameters
- The default parameters for the node. If any of the remaining parameters to this method are specified then
their values are taken instead of the corresponding value in defaultParameters.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!rpcUsers
- List of users who are authorised to use the RPC system. Defaults to empty list.verifierType
- The type of transaction verifier to use. See: enum VerifierType
.customOverrides
- A map of custom node configuration overrides.startInSameProcess
- Determines if the node should be started inside the same process the Driver is running
in. If null the Driver-level value will be used.maximumHeapSize
- The maximum JVM heap size to use for the node as a String. By default a number is interpreted
as being in bytes. Append the letter 'k' or 'K' to the value to indicate Kilobytes, 'm' or 'M' to indicate
megabytes, and 'g' or 'G' to indicate gigabytes. The default value is "512m" = 512 megabytes.logLevelOverride
- log4j log level used to override the default value of info.interface CordaFuture
on the interface NodeHandle
to the node. The future will complete when the node is available and
it sees all previously started nodes, including the notaries.class NodeParameters
CordaFuture<net.corda.testing.driver.NodeHandle> startNode(NodeParameters defaultParameters, CordaX500Name providedName, java.util.List<net.corda.testing.node.User> rpcUsers, VerifierType verifierType, java.util.Map<java.lang.String,? extends java.lang.Object> customOverrides, java.lang.Boolean startInSameProcess, java.lang.String maximumHeapSize)
Start a node.
NOTE: This method does not provide all the node parameters that are available and only exists for backwards compatibility. It is
recommended you use class NodeParameters
.
defaultParameters
- The default parameters for the node. If any of the remaining parameters to this method are specified then
their values are taken instead of the corresponding value in defaultParameters.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!rpcUsers
- List of users who are authorised to use the RPC system. Defaults to empty list.verifierType
- The type of transaction verifier to use. See: enum VerifierType
.customOverrides
- A map of custom node configuration overrides.startInSameProcess
- Determines if the node should be started inside the same process the Driver is running
in. If null the Driver-level value will be used.maximumHeapSize
- The maximum JVM heap size to use for the node as a String. By default a number is interpreted
as being in bytes. Append the letter 'k' or 'K' to the value to indicate Kilobytes, 'm' or 'M' to indicate
megabytes, and 'g' or 'G' to indicate gigabytes. The default value is "512m" = 512 megabytes.interface CordaFuture
on the interface NodeHandle
to the node. The future will complete when the node is available and
it sees all previously started nodes, including the notaries.class NodeParameters
CordaFuture<net.corda.testing.driver.WebserverHandle> startWebserver(NodeHandle handle)
Call DriverDSL.startWebserver
with a default maximumHeapSize.
DriverDSL.startWebserver
CordaFuture<net.corda.testing.driver.WebserverHandle> startWebserver(NodeHandle handle, java.lang.String maximumHeapSize)
Starts a web server for a node
handle
- The handle for the node that this webserver connects to via RPC.maximumHeapSize
- Argument for JVM -Xmx option e.g. "200m".java.nio.file.Path baseDirectory(CordaX500Name nodeName)
Returns the base directory for a node with the given class CordaX500Name
. This method is useful if the base directory
is needed before the node is started.
class CordaX500Name
int nextPort()
Returns the next port to use when instantiating test processes that must not conflict on the same machine