public class DriverDSL implements DriverDSLInternalInterface
| Modifier and Type | Class and Description |
|---|---|
static class |
DriverDSL.Companion |
static class |
DriverDSL.State |
| Modifier and Type | Field and Description |
|---|---|
static DriverDSL.Companion |
Companion |
| Constructor and Description |
|---|
DriverDSL(PortAllocation portAllocation,
PortAllocation debugPortAllocation,
java.nio.file.Path driverDirectory,
boolean useTestClock,
boolean isDebug) |
| 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() |
shutdown, startstartNode, startNotaryCluster, startWebserver, waitForAllNodesToFinishpublic static DriverDSL.Companion Companion
public DriverDSL(PortAllocation portAllocation, PortAllocation debugPortAllocation, java.nio.file.Path driverDirectory, boolean useTestClock, boolean isDebug)
public void registerProcess(com.google.common.util.concurrent.ListenableFuture<java.lang.Process> process)
public void waitForAllNodesToFinish()
public void shutdown()
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.
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.class NodeInfo of the started up node retrieved from the network map service.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.
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.class Party identity of the distributed notary service, and the class NodeInfos of the notaries in the cluster.public com.google.common.util.concurrent.ListenableFuture<com.google.common.net.HostAndPort> startWebserver(NodeHandle handle)
Starts a web server for a node
handle - The handle for the node that this webserver connects to via RPC.public void start()
public PortAllocation getPortAllocation()
public PortAllocation getDebugPortAllocation()
public java.nio.file.Path getDriverDirectory()
public boolean getUseTestClock()
public boolean isDebug()