Class: Synapse::Serialization::SerializedDomainEventMessage

Inherits:
SerializedEventMessage show all
Defined in:
lib/synapse/serialization/message/serialized_message.rb

Overview

Serialized representation of a domain event message

Instance Attribute Summary collapse

Attributes inherited from SerializedMessage

#id, #serialized_metadata, #serialized_payload, #timestamp

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SerializedMessage

#and_metadata, build, #metadata, #payload, #payload_type, #serialize_metadata, #serialize_payload, #with_metadata

Methods included from SerializationAware

#serialize_metadata, #serialize_payload

Constructor Details

#initialize(id, metadata, payload, timestamp, aggregate_id, sequence_number) ⇒ undefined

Parameters:

  • id (String)
  • metadata (LazyObject)
  • payload (LazyObject)
  • timestamp (Time)
  • aggregate_id (Object)
  • sequence_number (Integer)


156
157
158
159
160
161
# File 'lib/synapse/serialization/message/serialized_message.rb', line 156

def initialize(id, , payload, timestamp, aggregate_id, sequence_number)
  super id, , payload, timestamp

  @aggregate_id = aggregate_id
  @sequence_number = sequence_number
end

Instance Attribute Details

#aggregate_idObject (readonly)

Returns:

  • (Object)


144
145
146
# File 'lib/synapse/serialization/message/serialized_message.rb', line 144

def aggregate_id
  @aggregate_id
end

#sequence_numberInteger (readonly)

Returns:

  • (Integer)


147
148
149
# File 'lib/synapse/serialization/message/serialized_message.rb', line 147

def sequence_number
  @sequence_number
end

Class Method Details

.builderClass

Returns:

  • (Class)


164
165
166
# File 'lib/synapse/serialization/message/serialized_message.rb', line 164

def self.builder
  SerializedDomainEventMessageBuilder
end