OutboundEnvelope

interface OutboundEnvelope<ID : Any>

Defined the output of the aggregate program. Holds all the messages to be sent to the neighbors.

Types

Link copied to clipboard
object Companion

Utilities for OutboundEnvelope.

Link copied to clipboard
data class SharedData<ID : Any, Value>(val default: Value, val overrides: Map<ID, Value> = emptyMap())

Shared data holding a default value and overrides for each ID.

Functions

Link copied to clipboard
abstract fun <Value> addData(path: Path, data: OutboundEnvelope.SharedData<ID, Value>, dataSharingMethod: DataSharingMethod<Value>)

Adds the data generated at the given path to the envelope.

Link copied to clipboard
abstract fun isEmpty(): Boolean

Returns true if the envelope is empty.

Link copied to clipboard
abstract fun isNotEmpty(): Boolean

Returns true if the envelope contains data.

Link copied to clipboard
abstract fun prepareMessageFor(receiverId: ID, factory: MessageFactory<ID, *> = InMemoryMessageFactory()): Message<ID, Any?>

Extract the message for the receiverId through the given factory.