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: MessageRecipients, sessionID: Long, obj: Any): Unit`
sendAndReceive | `abstract fun <T : Any> sendAndReceive(topic: String, destination: MessageRecipients, sessionIDForSend: Long, sessionIDForReceive: Long, obj: 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.