public class EventStreamParser
extends java.lang.Object
ServerSentEvent
s.
This API is made for use in non-pekko-http clients, like Play's WSClient.
Constructor and Description |
---|
EventStreamParser() |
Modifier and Type | Method and Description |
---|---|
static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent,org.apache.pekko.NotUsed> |
apply(int maxLineSize,
int maxEventSize)
Flow that converts raw byte string input into
ServerSentEvent s. |
static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent,org.apache.pekko.NotUsed> |
apply(int maxLineSize,
int maxEventSize,
boolean emitEmptyEvents)
Flow that converts raw byte string input into
ServerSentEvent s. |
public static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent,org.apache.pekko.NotUsed> apply(int maxLineSize, int maxEventSize)
ServerSentEvent
s.
This API is made for use in non-pekko-http clients, like Play's WSClient.
maxLineSize
- The maximum size of a line for the event Stream parsermaxEventSize
- The maximum size of a server-sent event for the event Stream parserpublic static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent,org.apache.pekko.NotUsed> apply(int maxLineSize, int maxEventSize, boolean emitEmptyEvents)
ServerSentEvent
s.
This API is made for use in non-pekko-http clients, like Play's WSClient.
maxLineSize
- The maximum size of a line for the event Stream parsermaxEventSize
- The maximum size of a server-sent event for the event Stream parseremitEmptyEvents
- Should the parser emit events with empty data field