Class SseRenderer
- java.lang.Object
-
- org.nuxeo.lib.stream.tools.renderer.Renderer
-
- org.nuxeo.ecm.restapi.server.jaxrs.management.SseRenderer
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.servlet.http.HttpServletResponse
response
protected AvroSchemaStore
schemaStore
protected PrintWriter
writer
-
Fields inherited from class org.nuxeo.lib.stream.tools.renderer.Renderer
AVRO_MESSAGE_V1_HEADER, dataSize
-
-
Constructor Summary
Constructors Constructor Description SseRenderer(javax.servlet.http.HttpServletResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(LogRecord<Record> record)
protected String
asValidJson(String data)
void
close()
void
flush()
void
footer()
void
header()
protected String
watermarkString(long watermark)
void
writeJson(String json)
-
Methods inherited from class org.nuxeo.lib.stream.tools.renderer.Renderer
getFingerPrint, isAvroMessage, renderAvroMessage, tryToRenderAvroData
-
-
-
-
Field Detail
-
writer
protected final PrintWriter writer
-
schemaStore
protected final AvroSchemaStore schemaStore
-
response
protected final javax.servlet.http.HttpServletResponse response
-
-
Constructor Detail
-
SseRenderer
public SseRenderer(javax.servlet.http.HttpServletResponse response) throws IOException
- Throws:
IOException
-
-
Method Detail
-
flush
public void flush() throws IOException
- Throws:
IOException
-
writeJson
public void writeJson(String json)
-
watermarkString
protected String watermarkString(long watermark)
- Overrides:
watermarkString
in classRenderer
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-