Class EventReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class EventReader
    extends java.lang.Object
    implements java.io.Closeable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.fasterxml.jackson.databind.ObjectMapper objectMapper  
      private com.fasterxml.jackson.core.JsonParser parser  
      private org.apache.http.client.methods.CloseableHttpResponse response  
    • Constructor Summary

      Constructors 
      Constructor Description
      EventReader​(org.apache.http.client.methods.CloseableHttpResponse response, com.fasterxml.jackson.databind.ObjectMapper objectMapper)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      Event nextMessage()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • objectMapper

        private final com.fasterxml.jackson.databind.ObjectMapper objectMapper
      • response

        private final org.apache.http.client.methods.CloseableHttpResponse response
      • parser

        private com.fasterxml.jackson.core.JsonParser parser
    • Constructor Detail

      • EventReader

        public EventReader​(org.apache.http.client.methods.CloseableHttpResponse response,
                           com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • Method Detail

      • nextMessage

        public Event nextMessage()
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException