net.corda.node.services.messaging / startProtocol

# startProtocol

`inline fun <T : Any, reified R : ProtocolLogic<T>> CordaRPCOps.startProtocol(protocolConstructor: () -> R): <ERROR CLASS>`

These allow type safe invocations of protocols from Kotlin, e.g.:

val rpc: CordaRPCOps = (..) rpc.startProtocol(::ResolveTransactionsProtocol, setOf(), aliceIdentity)

Note that the passed in constructor function is only used for unification of other type parameters and reification of the Class instance of the protocol. This could be changed to use the constructor function directly.

`inline fun <T : Any, A, reified R : ProtocolLogic<T>> CordaRPCOps.startProtocol(protocolConstructor: (A) -> R, arg0: A): <ERROR CLASS>`
`inline fun <T : Any, A, B, reified R : ProtocolLogic<T>> CordaRPCOps.startProtocol(protocolConstructor: (A, B) -> R, arg0: A, arg1: B): <ERROR CLASS>`
`inline fun <T : Any, A, B, C, reified R : ProtocolLogic<T>> CordaRPCOps.startProtocol(protocolConstructor: (A, B, C) -> R, arg0: A, arg1: B, arg2: C): <ERROR CLASS>`
`inline fun <T : Any, A, B, C, D, reified R : ProtocolLogic<T>> CordaRPCOps.startProtocol(protocolConstructor: (A, B, C, D) -> R, arg0: A, arg1: B, arg2: C, arg3: D): <ERROR CLASS>`