SagaSends

class SagaSends(val derives: List<Class<*>> = emptyList(), val schedules: List<Class<*>> = emptyList(), val calls: List<Class<*>> = emptyList())

What a saga's handler declares it sends (me.ahoo.wow.api.annotation.Sends), by the commands' classes: those it derives (returns), those it schedules with SagaContext.schedule and those it calls with SagaContext.call. The compiler writes them into the handler's binding: what @Sends declares, else, for derives, what the handler's return type names. A command of a class none of the list's classes is, or is a subclass of, is undeclared: sending it fails the handling with an UndeclaredSendException.

Constructors

Link copied to clipboard
constructor(derives: List<Class<*>> = emptyList(), schedules: List<Class<*>> = emptyList(), calls: List<Class<*>> = emptyList())

Types

Link copied to clipboard

Properties

Link copied to clipboard
val calls: List<Class<*>>
Link copied to clipboard
val derives: List<Class<*>>
Link copied to clipboard

Functions

Link copied to clipboard
fun checkCalls(subscription: String, command: Class<*>)

Refuses command, which subscription calls, unless it calls it.

Link copied to clipboard
fun checkDerives(subscription: String, command: Class<*>)

Refuses command, which subscription derives, unless it derives it.

Link copied to clipboard
fun checkSchedules(subscription: String, command: Class<*>)

Refuses command, which subscription schedules, unless it schedules it.

Link copied to clipboard
open override fun toString(): String