Class SseEntity

java.lang.Object
org.apache.hc.core5.http.io.entity.AbstractHttpEntity
com.luna.common.net.sse.SseEntity
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hc.core5.http.EntityDetails, org.apache.hc.core5.http.HttpEntity

public class SseEntity extends org.apache.hc.core5.http.io.entity.AbstractHttpEntity
  • Constructor Details

    • SseEntity

      public SseEntity(org.apache.hc.core5.http.ContentType contentType)
  • Method Details

    • getAllEvent

      public StringBuilder getAllEvent()
    • pushBuffer

      public void pushBuffer(CharBuffer buf, boolean endOfStream)
    • getEvents

      public BlockingQueue<Event> getEvents()
    • setEvents

      public void setEvents(BlockingQueue<Event> events)
    • hasMoreEvents

      public boolean hasMoreEvents()
    • getLastEventId

      public String getLastEventId()
    • isRepeatable

      public boolean isRepeatable()
      Specified by:
      isRepeatable in interface org.apache.hc.core5.http.HttpEntity
      Overrides:
      isRepeatable in class org.apache.hc.core5.http.io.entity.AbstractHttpEntity
    • getContentLength

      public long getContentLength()
    • getContent

      Throws:
      IOException
      UnsupportedOperationException
    • writeTo

      public void writeTo(OutputStream outStream) throws IOException
      Specified by:
      writeTo in interface org.apache.hc.core5.http.HttpEntity
      Overrides:
      writeTo in class org.apache.hc.core5.http.io.entity.AbstractHttpEntity
      Throws:
      IOException
    • isStreaming

      public boolean isStreaming()
    • close

      public void close() throws IOException
      Throws:
      IOException