org.axonframework.eventhandling.io
Class EventMessageWriter
java.lang.Object
org.axonframework.eventhandling.io.EventMessageWriter
public class EventMessageWriter
- extends Object
Writer that writes Event Messages onto a an OutputStream. The format of the message makes them suitable to be read
back in using a 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).
- Since:
- 2.0
- Author:
- Allard Buijze
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventMessageWriter
public EventMessageWriter(DataOutput output,
Serializer serializer)
- Creates a new EventMessageWriter writing data to the specified underlying
output
.
- Parameters:
output
- the underlying outputserializer
- The serializer to deserialize payload and metadata with
writeEventMessage
public void writeEventMessage(EventMessage eventMessage)
throws IOException
- Writes the given
eventMessage
to the underling output.
- Parameters:
eventMessage
- the EventMessage to write to the underlying output
- Throws:
IOException
- when any exception occurs writing to the underlying stream
Copyright © 2010-2016. All Rights Reserved.