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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longbooleanbooleanbooleanvoidpushBuffer(CharBuffer buf, boolean endOfStream) voidsetEvents(BlockingQueue<Event> events) voidwriteTo(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:
isRepeatablein interfaceorg.apache.hc.core5.http.HttpEntity- Overrides:
isRepeatablein classorg.apache.hc.core5.http.io.entity.AbstractHttpEntity
-
getContentLength
public long getContentLength() -
getContent
-
writeTo
- Specified by:
writeToin interfaceorg.apache.hc.core5.http.HttpEntity- Overrides:
writeToin classorg.apache.hc.core5.http.io.entity.AbstractHttpEntity- Throws:
IOException
-
isStreaming
public boolean isStreaming() -
close
- Throws:
IOException
-