RPCDriverDSL

data class RPCDriverDSL(driverDSL: DriverDSLImpl, externalTrace: <Error class: unknown class>?) : InternalDriverDSL

Constructors

Link copied to clipboard
constructor(driverDSL: DriverDSLImpl, externalTrace: <Error class: unknown class>?)

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: <Error class: unknown class>

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

Link copied to clipboard
open override val defaultNotaryNode: <Error class: unknown class><NodeHandle>

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
fun DriverDSL.assertUncompletedCheckpoints(name: <Error class: unknown class>, expected: Long)
Link copied to clipboard
open override fun baseDirectory(nodeName: String): 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.

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?): <Error class: unknown class><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): <Error class: unknown class><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: <Error class: unknown class>, 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> startInVmRpcClient(rpcOpsClass: Class<I>, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT): <Error class: unknown class><I>

Starts an In-VM RPC client.

Link copied to clipboard
inline fun <I> RPCDriverDSL.startInVmRpcClient(username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT): <Error class: unknown class><I>
Link copied to clipboard
fun <I> startInVmRpcServer(rpcUser: User = rpcTestUser, nodeLegalName: <Error class: unknown class> = 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): <Error class: unknown class><RpcServerHandle<I>>

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

Link copied to clipboard
open override fun startNode(): <Error class: unknown class><NodeHandle>

Start a node using the default values of NodeParameters.

open override fun startNode(parameters: NodeParameters): <Error class: unknown class><NodeHandle>

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

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

Start a node.

open override fun startNode(parameters: NodeParameters, bytemanPort: Int?): <Error class: unknown class><NodeHandle>
Link copied to clipboard
fun DriverDSL.startNode(providedName: <Error class: unknown class>, devMode: Boolean, parameters: NodeParameters = NodeParameters()): <Error class: unknown class><NodeHandle>
Link copied to clipboard
fun <I> startRandomRpcClient(rpcOpsClass: Class<I>, rpcAddress: <Error class: unknown class>, username: String = rpcTestUser.username, password: String = rpcTestUser.password): <Error class: unknown class><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> RPCDriverDSL.startRandomRpcClient(hostAndPort: <Error class: unknown class>, username: String = rpcTestUser.username, password: String = rpcTestUser.password): <Error class: unknown class><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: <Error class: unknown class>? = null): <Error class: unknown class><RpcBrokerHandle>
Link copied to clipboard
fun <I> startRpcClient(rpcOpsClass: Class<I>, rpcAddress: <Error class: unknown class>, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT): <Error class: unknown class><I>
fun <I> startRpcClient(rpcOpsClass: Class<I>, haAddressPool: List<<Error class: unknown class>>, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT): <Error class: unknown class><I>
fun <I> startRpcClient(rpcOpsClass: Class<I>, rpcAddress: <Error class: unknown class>, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, listeners: Iterable<RPCConnectionListener<I>> = emptyList()): <Error class: unknown class><<Error class: unknown class><RPCConnection<I>, RPCClient<I>>>
fun <I> startRpcClient(rpcOpsClass: Class<I>, haAddressPool: List<<Error class: unknown class>>, username: String = rpcTestUser.username, password: String = rpcTestUser.password, configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT, listeners: Iterable<RPCConnectionListener<I>> = emptyList()): <Error class: unknown class><<Error class: unknown class><RPCConnection<I>, RPCClient<I>>>

Starts a Netty RPC client.

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

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

Starts a Netty RPC server.

Link copied to clipboard
fun <I> startRpcServerWithBrokerRunning(rpcUser: User = rpcTestUser, nodeLegalName: <Error class: unknown class> = fakeNodeLegalName, configuration: <Error class: unknown class> = RPCServerConfiguration.DEFAULT, ops: I, brokerHandle: RpcBrokerHandle, queueDrainTimeout: Duration = 5.seconds): <Error class: unknown class>
Link copied to clipboard
open override fun startWebserver(handle: NodeHandle): <Error class: unknown class><WebserverHandle>

Call startWebserver with a default maximumHeapSize.

open override fun startWebserver(handle: NodeHandle, maximumHeapSize: String): <Error class: unknown class><WebserverHandle>

Starts a web server for a node

Link copied to clipboard
fun <T> DriverDSL.withDatabaseConnection(name: <Error class: unknown class>, block: (Connection) -> T): T