public class EventStreamParser
extends java.lang.Object
ServerSentEvents.
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
ServerSentEvents. |
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
ServerSentEvents. |
static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent,org.apache.pekko.NotUsed> |
apply(int maxLineSize,
int maxEventSize,
boolean emitEmptyEvents,
OversizedSseStrategy oversizedStrategy)
Flow that converts raw byte string input into
ServerSentEvents. |
static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent,org.apache.pekko.NotUsed> |
apply(int maxLineSize,
int maxEventSize,
boolean emitEmptyEvents,
OversizedSseStrategy oversizedLineStrategy,
OversizedSseStrategy oversizedEventStrategy)
Flow that converts raw byte string input into
ServerSentEvents. |
static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent,org.apache.pekko.NotUsed> |
apply(int maxLineSize,
int maxEventSize,
boolean emitEmptyEvents,
java.lang.String oversizedStrategy)
Flow that converts raw byte string input into
ServerSentEvents. |
public static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent,org.apache.pekko.NotUsed> apply(int maxLineSize, int maxEventSize)
ServerSentEvents.
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)
ServerSentEvents.
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 fieldpublic static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent,org.apache.pekko.NotUsed> apply(int maxLineSize, int maxEventSize, boolean emitEmptyEvents, java.lang.String oversizedStrategy)
ServerSentEvents.
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 fieldoversizedStrategy - How to handle messages that exceed max-line-sizepublic static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent,org.apache.pekko.NotUsed> apply(int maxLineSize, int maxEventSize, boolean emitEmptyEvents, OversizedSseStrategy oversizedStrategy)
ServerSentEvents.
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 fieldoversizedStrategy - How to handle messages that exceed max-line-size and max-event-sizepublic static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent,org.apache.pekko.NotUsed> apply(int maxLineSize, int maxEventSize, boolean emitEmptyEvents, OversizedSseStrategy oversizedLineStrategy, OversizedSseStrategy oversizedEventStrategy)
ServerSentEvents.
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 fieldoversizedLineStrategy - How to handle lines that exceed max-line-sizeoversizedEventStrategy - How to handle events that exceed max-event-size