interface ProtocolStateMachine<R>
The interface of ProtocolStateMachineImpl exposing methods and properties required by ProtocolLogic for compilation.
logger |
abstract val logger: <ERROR CLASS> |
machineId |
abstract val machineId: Long Unique ID for this machine, valid only while it is in memory. |
resultFuture |
abstract val resultFuture: <ERROR CLASS><R> This future will complete when the call method returns. |
serviceHub |
abstract val serviceHub: ServiceHub |
receive |
abstract fun <T : Any> receive(topic: String, sessionIDForReceive: Long, receiveType: Class<T>): UntrustworthyData<T> |
send |
abstract fun send(topic: String, destination: Party, sessionID: Long, payload: Any): Unit |
sendAndReceive |
abstract fun <T : Any> sendAndReceive(topic: String, destination: Party, sessionIDForSend: Long, sessionIDForReceive: Long, payload: Any, receiveType: Class<T>): UntrustworthyData<T> |
ProtocolStateMachineImpl |
class ProtocolStateMachineImpl<R> : ProtocolStateMachine<R> A ProtocolStateMachine instance is a suspendable fiber that delegates all actual logic to a ProtocolLogic instance. For any given flow there is only one PSM, even if that protocol invokes subprotocols. |