Class EventStreamParser
java.lang.Object
akka.http.scaladsl.unmarshalling.sse.EventStreamParser
Flow that converts raw byte string input into
ServerSentEvent
s.
This API is made for use in non-akka-http clients, like Play's WSClient.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic akka.stream.scaladsl.Flow<akka.util.ByteString,
ServerSentEvent, akka.NotUsed> apply
(int maxLineSize, int maxEventSize) Flow that converts raw byte string input intoServerSentEvent
s.static akka.stream.scaladsl.Flow<akka.util.ByteString,
ServerSentEvent, akka.NotUsed> apply
(int maxLineSize, int maxEventSize, boolean emitEmptyEvents) Flow that converts raw byte string input intoServerSentEvent
s.
-
Constructor Details
-
EventStreamParser
public EventStreamParser()
-
-
Method Details
-
apply
public static akka.stream.scaladsl.Flow<akka.util.ByteString,ServerSentEvent, applyakka.NotUsed> (int maxLineSize, int maxEventSize) Flow that converts raw byte string input intoServerSentEvent
s.This API is made for use in non-akka-http clients, like Play's WSClient.
- Parameters:
maxLineSize
- The maximum size of a line for the event Stream parsermaxEventSize
- The maximum size of a server-sent event for the event Stream parser- Returns:
- (undocumented)
-
apply
public static akka.stream.scaladsl.Flow<akka.util.ByteString,ServerSentEvent, applyakka.NotUsed> (int maxLineSize, int maxEventSize, boolean emitEmptyEvents) Flow that converts raw byte string input intoServerSentEvent
s.This API is made for use in non-akka-http clients, like Play's WSClient.
- Parameters:
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- Returns:
- (undocumented)
-