Class EventReader


  • public class EventReader
    extends java.lang.Object

    Utility class to read Event objects from a text stream in event file format (individually, or in batches with optional timestamps if the BATCH keyword is used in the input stream).

    See the Apama documentation for details of the event file format used by this class.

    • Constructor Summary

      Constructors 
      Constructor Description
      EventReader​(java.io.BufferedReader source, java.lang.String defaultChannel)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Vector<Event> getNextEvents​(java.lang.Long[] timestampHolder, java.lang.Boolean[] finishedHolder)
      Read the next (batch of) event(s) from the bufferedReader.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EventReader

        public EventReader​(java.io.BufferedReader source,
                           java.lang.String defaultChannel)
        Constructor.
        Parameters:
        source - An initialised instance of BufferedReader
    • Method Detail

      • getNextEvents

        public java.util.Vector<Event> getNextEvents​(java.lang.Long[] timestampHolder,
                                                     java.lang.Boolean[] finishedHolder)
        Read the next (batch of) event(s) from the bufferedReader.
        Parameters:
        timestampHolder - This must be an array of java.lang.Long of size 1 - used for returning the timestamp.
        finishedHolder - This must be an array of java.lang.Boolean of size 1 - used for returning the finished flag.
        Returns:
        A Vector containing com.apama.event.Event objects.