Class EventStreamParser
java.lang.Object
org.apache.pekko.http.scaladsl.unmarshalling.sse.EventStreamParser
Flow that converts raw byte string input into 
ServerSentEvents.
 This API is made for use in non-pekko-http clients, like Play's WSClient.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic 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 intoServerSentEvents.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 intoServerSentEvents.static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent, org.apache.pekko.NotUsed> Flow that converts raw byte string input intoServerSentEvents.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 intoServerSentEvents.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 intoServerSentEvents.
- 
Constructor Details- 
EventStreamParserpublic EventStreamParser()
 
- 
- 
Method Details- 
applypublic static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent, applyorg.apache.pekko.NotUsed> (int maxLineSize, int maxEventSize) Flow that converts raw byte string input intoServerSentEvents.This API is made for use in non-pekko-http clients, like Play's WSClient. - Parameters:
- maxLineSize- The maximum size of a line for the event Stream parser
- maxEventSize- The maximum size of a server-sent event for the event Stream parser
- Returns:
- (undocumented)
 
- 
applypublic static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent, applyorg.apache.pekko.NotUsed> (int maxLineSize, int maxEventSize, boolean emitEmptyEvents) Flow that converts raw byte string input intoServerSentEvents.This API is made for use in non-pekko-http clients, like Play's WSClient. - Parameters:
- maxLineSize- The maximum size of a line for the event Stream parser
- maxEventSize- The maximum size of a server-sent event for the event Stream parser
- emitEmptyEvents- Should the parser emit events with empty data field
- Returns:
- (undocumented)
 
- 
applypublic static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent, applyorg.apache.pekko.NotUsed> (int maxLineSize, int maxEventSize, boolean emitEmptyEvents, String oversizedStrategy) Flow that converts raw byte string input intoServerSentEvents.This API is made for use in non-pekko-http clients, like Play's WSClient. - Parameters:
- maxLineSize- The maximum size of a line for the event Stream parser
- maxEventSize- The maximum size of a server-sent event for the event Stream parser
- emitEmptyEvents- Should the parser emit events with empty data field
- oversizedStrategy- How to handle messages that exceed max-line-size
- Returns:
- (undocumented)
- Since:
- 1.3.0
 
- 
applypublic static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent, applyorg.apache.pekko.NotUsed> (int maxLineSize, int maxEventSize, boolean emitEmptyEvents, OversizedSseStrategy oversizedStrategy) Flow that converts raw byte string input intoServerSentEvents.This API is made for use in non-pekko-http clients, like Play's WSClient. - Parameters:
- maxLineSize- The maximum size of a line for the event Stream parser
- maxEventSize- The maximum size of a server-sent event for the event Stream parser
- emitEmptyEvents- Should the parser emit events with empty data field
- oversizedStrategy- How to handle messages that exceed max-line-size and max-event-size
- Returns:
- (undocumented)
- Since:
- 1.3.0
 
- 
applypublic static org.apache.pekko.stream.scaladsl.Flow<org.apache.pekko.util.ByteString,ServerSentEvent, applyorg.apache.pekko.NotUsed> (int maxLineSize, int maxEventSize, boolean emitEmptyEvents, OversizedSseStrategy oversizedLineStrategy, OversizedSseStrategy oversizedEventStrategy) Flow that converts raw byte string input intoServerSentEvents.This API is made for use in non-pekko-http clients, like Play's WSClient. - Parameters:
- maxLineSize- The maximum size of a line for the event Stream parser
- maxEventSize- The maximum size of a server-sent event for the event Stream parser
- emitEmptyEvents- Should the parser emit events with empty data field
- oversizedLineStrategy- How to handle lines that exceed max-line-size
- oversizedEventStrategy- How to handle events that exceed max-event-size
- Returns:
- (undocumented)
- Since:
- 1.3.0
 
 
-