protected inline fun <reified H : HandshakeMessage, R : Any> addProtocolHandler(topic: String, loggerName: String, crossinline protocolFactory: (H) -> ProtocolLogic<R>, crossinline onResultFuture: (<ERROR CLASS><R>, H) -> Unit): Unit
Register a handler to kick-off a protocol when a HandshakeMessage is received by the node. This performs the necessary steps to enable communication between the two protocols, including calling ProtocolLogic.registerSession.
topic
- the topic on which the handshake is sent from the other partyloggerName
- the logger name to use when starting the protocolprotocolFactory
- a function to create the protocol with the given handshake messageonResultFuture
- provides access to the ListenableFuture when the protocol startsprotected inline fun <reified H : HandshakeMessage, R : Any> addProtocolHandler(topic: String, loggerName: String, crossinline protocolFactory: (H) -> ProtocolLogic<R>): Unit