corda / net.corda.testing.flows / receiveAll

receiveAll

fun <ERROR CLASS><out <ERROR CLASS>>.receiveAll(session: <ERROR CLASS><<ERROR CLASS>, Class<out Any>>, vararg sessions: <ERROR CLASS><<ERROR CLASS>, Class<out Any>>): Map<<ERROR CLASS>, <ERROR CLASS><Any>>

Suspends until a message has been received for each session in the specified sessions.

Consider receiveAllreceiveTypeClass,sessionsListListUntrustworthyData when the same type is expected from all sessions.

Remember that when receiving data from other parties the data should not be trusted until it's been thoroughly verified for consistency and that all expectations are satisfied, as a malicious peer may send you subtly corrupted data in order to exploit your code.

Returns
a Map containing the objects received, wrapped in an UntrustworthyData, by the FlowSessions who sent them.

fun <R : Any> <ERROR CLASS><out <ERROR CLASS>>.receiveAll(receiveType: Class<R>, session: <ERROR CLASS>, vararg sessions: <ERROR CLASS>): List<<ERROR CLASS><R>>
inline fun <reified R : Any> <ERROR CLASS><out <ERROR CLASS>>.receiveAll(session: <ERROR CLASS>, vararg sessions: <ERROR CLASS>): List<<ERROR CLASS><R>>

Suspends until a message has been received for each session in the specified sessions.

Consider sessionsMapFlowSession,ClassMapFlowSession,UntrustworthyData when sessions are expected to receive different types.

Remember that when receiving data from other parties the data should not be trusted until it's been thoroughly verified for consistency and that all expectations are satisfied, as a malicious peer may send you subtly corrupted data in order to exploit your code.

Returns
a List containing the objects received, wrapped in an UntrustworthyData, with the same order of sessions.