public class EventMessageWriter extends Object
EventMessageReader
. This writer distinguishes between DomainEventMessage and plain
EventMessage when writing. The reader will reconstruct an aggregate implementation for the same message type (i.e.
DomainEventMessage or EventMessage).Constructor and Description |
---|
EventMessageWriter(DataOutput output,
Serializer serializer)
Creates a new EventMessageWriter writing data to the specified underlying
output . |
Modifier and Type | Method and Description |
---|---|
void |
writeEventMessage(EventMessage eventMessage)
Writes the given
eventMessage to the underling output. |
public EventMessageWriter(DataOutput output, Serializer serializer)
output
.output
- the underlying outputserializer
- The serializer to deserialize payload and metadata withpublic void writeEventMessage(EventMessage eventMessage) throws IOException
eventMessage
to the underling output.eventMessage
- the EventMessage to write to the underlying outputIOException
- when any exception occurs writing to the underlying streamCopyright © 2010–2018. All rights reserved.