RPCDriverDSL

data class RPCDriverDSL(driverDSL: DriverDSLImpl, externalTrace: Trace?) : InternalDriverDSL

Constructors

Link copied to clipboard
constructor(driverDSL: DriverDSLImpl, externalTrace: Trace?)

Properties

Link copied to clipboard
open override val cordappsClassLoader: ClassLoader?
Link copied to clipboard

Returns the NotaryHandle for the single notary on the network. Throws if there are none or more than one.

Link copied to clipboard
open override val defaultNotaryIdentity: Party

Returns the identity of the single notary on the network. Throws if there are none or more than one.

Link copied to clipboard

Returns a CordaFuture on the 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.

Link copied to clipboard
open override val notaryHandles: List<NotaryHandle>

Returns a list of NotaryHandles matching the list of NotarySpecs passed into driver.

Link copied to clipboard
open override val shutdownManager: ShutdownManager

Functions

Link copied to clipboard
open override fun baseDirectory(nodeName: CordaX500Name): Path

Returns the base directory for a node with the given CordaX500Name. This method is useful if the base directory is needed before the node is started.

open override fun baseDirectory(nodeName: String): Path
Link copied to clipboard
open override fun nextPort(): Int

Returns the next port to use when instantiating test processes that must not conflict on the same machine

Link copied to clipboard
open override fun <A> pollUntilNonNull(pollName: String, pollInterval: Duration, warnCount: Int, check: () -> A?): CordaFuture<A>

Polls a function until it returns a non-null value. Note that there is no timeout on the polling.

Link copied to clipboard
open override fun pollUntilTrue(pollName: String, pollInterval: Duration, warnCount: Int, check: () -> Boolean): CordaFuture<Unit>

Polls the given function until it returns true.

Link copied to clipboard
open override fun shutdown()
Link copied to clipboard
open override fun start()
Link copied to clipboard
fun startArtemisSession(rpcAddress: NetworkHostAndPort, username: String = rpcTestUser.username, password: String = rpcTestUser.password): <Error class: unknown class>

Starts a Netty Artemis session connecting to an RPC server.

Link copied to clipboard
fun startInVmArtemisSession(username: String = rpcTestUser.username, password: String = rpcTestUser.password): <Error class: unknown class>

Starts an In-VM Artemis session connecting to the RPC server.

Link copied to clipboard
fun <I : RPCOps> startInVmRpcClient(rpcOpsClass: Class<I>, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT): CordaFuture<I>

Starts an In-VM RPC client.

Link copied to clipboard
inline fun <I : RPCOps> RPCDriverDSL.startInVmRpcClient(username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT): <Error class: unknown class>
Link copied to clipboard
fun <I : RPCOps> startInVmRpcServer(rpcUser: User = rpcTestUser, nodeLegalName: CordaX500Name = fakeNodeLegalName, maxFileSize: Int = MAX_MESSAGE_SIZE, maxBufferedBytesPerClient: Long = 10L * MAX_MESSAGE_SIZE, configuration: <Error class: unknown class> = RPCServerConfiguration.DEFAULT, ops: I, queueDrainTimeout: Duration = 5.seconds): CordaFuture<RpcServerHandle>

Starts an In-VM RPC server. Note that only a single one may be started.

Link copied to clipboard
open override fun startNode(): CordaFuture<NodeHandle>

Start a node using the default values of NodeParameters.

open override fun startNode(parameters: NodeParameters): CordaFuture<NodeHandle>

Start a node using the parameter values of the given NodeParameters.

open override fun startNode(defaultParameters: NodeParameters, providedName: CordaX500Name?, rpcUsers: List<User>, verifierType: VerifierType, customOverrides: Map<String, Any?>, startInSameProcess: Boolean?, maximumHeapSize: String): CordaFuture<NodeHandle>
open override fun startNode(defaultParameters: NodeParameters, providedName: CordaX500Name?, rpcUsers: List<User>, verifierType: VerifierType, customOverrides: Map<String, Any?>, startInSameProcess: Boolean?, maximumHeapSize: String, logLevelOverride: String?): CordaFuture<NodeHandle>

Start a node.

open override fun startNode(parameters: NodeParameters, bytemanPort: Int?): CordaFuture<NodeHandle>
Link copied to clipboard
fun DriverDSL.startNode(providedName: CordaX500Name, devMode: Boolean, parameters: NodeParameters = NodeParameters()): CordaFuture<NodeHandle>
Link copied to clipboard
fun <I : RPCOps> startRandomRpcClient(rpcOpsClass: Class<I>, rpcAddress: NetworkHostAndPort, username: String = rpcTestUser.username, password: String = rpcTestUser.password): CordaFuture<Process>

Starts a Netty RPC client in a new JVM process that calls random RPCs with random arguments.

Link copied to clipboard
inline fun <I : RPCOps> RPCDriverDSL.startRandomRpcClient(hostAndPort: NetworkHostAndPort, username: String = rpcTestUser.username, password: String = rpcTestUser.password): CordaFuture<Process>
Link copied to clipboard
fun startRpcBroker(serverName: String = "driver-rpc-server-", rpcUser: User = rpcTestUser, maxFileSize: Int = MAX_MESSAGE_SIZE, maxBufferedBytesPerClient: Long = 10L * MAX_MESSAGE_SIZE, customPort: NetworkHostAndPort? = null): CordaFuture<RpcBrokerHandle>
Link copied to clipboard
fun <I : RPCOps> startRpcClient(rpcOpsClass: Class<I>, haAddressPool: List<NetworkHostAndPort>, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT): CordaFuture<I>
fun <I : RPCOps> startRpcClient(rpcOpsClass: Class<I>, rpcAddress: NetworkHostAndPort, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT): CordaFuture<I>
fun <I : RPCOps> startRpcClient(rpcOpsClass: Class<I>, haAddressPool: List<NetworkHostAndPort>, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, listeners: Iterable<RPCConnectionListener<I>> = emptyList()): CordaFuture<<Error class: unknown class><RPCConnection<I>, RPCClient<I>>>
fun <I : RPCOps> startRpcClient(rpcOpsClass: Class<I>, rpcAddress: NetworkHostAndPort, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, listeners: Iterable<RPCConnectionListener<I>> = emptyList()): CordaFuture<<Error class: unknown class><RPCConnection<I>, RPCClient<I>>>

Starts a Netty RPC client.

Link copied to clipboard
inline fun <I : RPCOps> RPCDriverDSL.startRpcClient(haAddressPool: List<NetworkHostAndPort>, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT): <Error class: unknown class>
inline fun <I : RPCOps> RPCDriverDSL.startRpcClient(rpcAddress: NetworkHostAndPort, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT): <Error class: unknown class>
Link copied to clipboard
fun <I : RPCOps> startRpcServer(serverName: String = "driver-rpc-server-", rpcUser: User = rpcTestUser, nodeLegalName: CordaX500Name = fakeNodeLegalName, maxFileSize: Int = MAX_MESSAGE_SIZE, maxBufferedBytesPerClient: Long = 5L * MAX_MESSAGE_SIZE, configuration: <Error class: unknown class> = RPCServerConfiguration.DEFAULT, customPort: NetworkHostAndPort? = null, ops: I): CordaFuture<RpcServerHandle>

fun <I : RPCOps> startRpcServer(serverName: String = "driver-rpc-server-", rpcUser: User = rpcTestUser, nodeLegalName: CordaX500Name = fakeNodeLegalName, maxFileSize: Int = MAX_MESSAGE_SIZE, maxBufferedBytesPerClient: Long = 5L * MAX_MESSAGE_SIZE, configuration: <Error class: unknown class> = RPCServerConfiguration.DEFAULT, customPort: NetworkHostAndPort? = null, listOps: List<I>): CordaFuture<RpcServerHandle>

Starts a Netty RPC server.

Link copied to clipboard
fun <I : RPCOps> startRpcServerWithBrokerRunning(rpcUser: User = rpcTestUser, nodeLegalName: CordaX500Name = fakeNodeLegalName, configuration: <Error class: unknown class> = RPCServerConfiguration.DEFAULT, ops: I, brokerHandle: RpcBrokerHandle, queueDrainTimeout: Duration = 5.seconds): RpcServerHandle
Link copied to clipboard

Call startWebserver with a default maximumHeapSize.

open override fun startWebserver(handle: NodeHandle, maximumHeapSize: String): CordaFuture<WebserverHandle>

Starts a web server for a node