Resolution

sealed interface Resolution<out T>(source)

What one factory decided about one event or property.

A factory answers for what it knows and passes the rest along:

  • Claimed — mine, and here is what to send.

  • Dropped — mine, and it goes nowhere. The chain stops, so no later factory sees it.

  • Declined — not mine. The next factory gets a look.

Inheritors

Types

Link copied to clipboard
data class Claimed<T>(val handlers: List<T>) : Resolution<T>

Mine, and these are the handlers to run. Must not be empty — use Dropped for that.

Link copied to clipboard
data object Declined : Resolution<Nothing>

Not mine — try the next factory in the chain.

Link copied to clipboard
data object Dropped : Resolution<Nothing>

Mine, and it goes nowhere. Stops the chain, so no later factory can claim it.

Properties

Link copied to clipboard
abstract val handlers: List<T>

The handlers to run. Empty for Dropped and Declined.