Package org.apache.juneau.marshall.sse
package org.apache.juneau.marshall.sse
Server-Sent Events (SSE) marshalling support โ
text/event-stream.
Provides SseSerializer and SseParser
for the
WHATWG Server-Sent Events
wire format. The serializer accepts a single SseEvent, an
Iterable, a Stream, or an
SseEvent[] array and emits one event per element with a flush() after each one โ that is what makes server push actually work behind
SerializedPojoProcessor.
SSE streams are typically long-lived. For true line-driven streaming over a Reader
that the caller owns, use the SseEventReader iterator.
See Also:
-
ClassesClassDescriptionRepresents a single Server-Sent Event (SSE) frame on the wire.Line-driven
Iteratorover the events in atext/event-stream .Parsestext/event-stream input (WHATWG Server-Sent Events) into Java objects.Builder class.Session object that lives for the duration of a single use ofSseParser.Builder class.SerializesSseEventobjects to thetext/event-stream wire format defined by the WHATWG Server-Sent Events spec.Builder class.Session object that lives for the duration of a single use ofSseSerializer.Builder class.