StartedMockNode

A class that represents a started mock node for testing.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val id: Int

An identifier for the node. By default this is allocated sequentially in a MockNetwork.

Link copied to clipboard
val info: <Error class: unknown class>

The NodeInfo for the underlying node.

Link copied to clipboard
val services: <Error class: unknown class>

The ServiceHub for the underlying node.

Functions

Link copied to clipboard
fun <F> findStateMachines(flowClass: Class<F>): List<<Error class: unknown class><F, <Error class: unknown class><out <Error class: unknown class>>>>

Returns the currently live flows of type flowClass, and their corresponding result future.

Link copied to clipboard

Delivers a single message from the internal queue. If there are no messages waiting to be delivered and block is true, waits until one has been provided on a different thread via send. If block is false, the return result indicates whether a message was delivered or not.

Link copied to clipboard
fun <F> registerInitiatedFlow(initiatedFlowClass: Class<F>): <Error class: unknown class><F>

Manually register an initiating-responder flow pair based on the FlowLogic annotations.

fun <F> registerInitiatedFlow(initiatingFlowClass: Class<out <Error class: unknown class><out <Error class: unknown class>>>, initiatedFlowClass: Class<F>): <Error class: unknown class><F>

Register a custom relationship between initiating and receiving flow on a node-by-node basis. This is used when we want to manually specify that a particular initiating flow class will have a particular responder.

Link copied to clipboard
fun <T> startFlow(logic: <Error class: unknown class><T>): <Error class: unknown class><T>

Starts an already constructed flow. Note that you must be on the server thread to call this method.

Link copied to clipboard
fun stop(): <Error class: unknown class>

Stop the node.

Link copied to clipboard
fun <T> transaction(statement: () -> T): T

Executes given statement in the scope of transaction.