com.r3corda.core.protocols / ProtocolStateMachine

# ProtocolStateMachine

`interface ProtocolStateMachine<R>`

The interface of ProtocolStateMachineImpl exposing methods and properties required by ProtocolLogic for compilation.

### Properties

logger | `abstract val logger: <ERROR CLASS>`
serviceHub | `abstract val serviceHub: ServiceHub`

### Functions

receive | `abstract fun <T : Any> receive(topic: String, sessionIDForReceive: Long, recvType: 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, recvType: Class<T>): UntrustworthyData<T>`

### Inheritors

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.