Package com.luna.common.net.sse
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
boolean
boolean
boolean
void
pushBuffer
(CharBuffer buf, boolean endOfStream) void
setEvents
(BlockingQueue<Event> events) void
writeTo
(OutputStream outStream) Methods inherited from class org.apache.hc.core5.http.io.entity.AbstractHttpEntity
getContentEncoding, getContentType, getTrailerNames, getTrailers, isChunked, toString, writeTo
-
Constructor Details
-
SseEntity
public SseEntity(org.apache.hc.core5.http.ContentType contentType)
-
-
Method Details
-
getAllEvent
-
pushBuffer
-
getEvents
-
setEvents
-
hasMoreEvents
public boolean hasMoreEvents() -
getLastEventId
-
isRepeatable
public boolean isRepeatable()- Specified by:
isRepeatable
in interfaceorg.apache.hc.core5.http.HttpEntity
- Overrides:
isRepeatable
in classorg.apache.hc.core5.http.io.entity.AbstractHttpEntity
-
getContentLength
public long getContentLength() -
getContent
-
writeTo
- Specified by:
writeTo
in interfaceorg.apache.hc.core5.http.HttpEntity
- Overrides:
writeTo
in classorg.apache.hc.core5.http.io.entity.AbstractHttpEntity
- Throws:
IOException
-
isStreaming
public boolean isStreaming() -
close
- Throws:
IOException
-