org.axonframework.eventstore.fs
Class FileSystemEventMessageReader

java.lang.Object
  extended by org.axonframework.eventstore.fs.FileSystemEventMessageReader
All Implemented Interfaces:
Closeable

public class FileSystemEventMessageReader
extends Object
implements Closeable

Reads events from the file system returns an event in a raw form as SerializedDomainEventData.

Since:
2.0
Author:
Frank Versnel

Constructor Summary
FileSystemEventMessageReader(DataInput input)
          Creates a new EventMessageReader that reads the data from the given input and deserializes payload and meta data using the given serializer.
 
Method Summary
 void close()
           
 SerializedDomainEventData readEventMessage()
          Reads the next event from the input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemEventMessageReader

public FileSystemEventMessageReader(DataInput input)
Creates a new EventMessageReader that reads the data from the given input and deserializes payload and meta data using the given serializer.

Parameters:
input - The input providing access to the written data
Method Detail

readEventMessage

public SerializedDomainEventData readEventMessage()
                                           throws IOException
Reads the next event from the input.

Returns:
the event read from the input
Throws:
IOException - when an error occurs reading from the underlying input
EOFException - when the end of the stream was reached before the message was entirely read

close

public void close()
Specified by:
close in interface Closeable


Copyright © 2010-2016. All Rights Reserved.