Interface EventStreamUnmarshalling
- All Known Implementing Classes:
EventStreamUnmarshalling$
public interface EventStreamUnmarshalling
Mixing in this trait lets a
HttpEntity
with a text/event-stream
media type be unmarshalled to a source of
ServerSentEvent
s.
The maximum size for parsing server-sent events is 8KiB by default and can be customized by configuring
pekko.http.sse.max-event-size
. The maximum size for parsing lines of a server-sent event is 4KiB by
default and can be customized by configuring pekko.http.sse.max-line-size
.
-
Method Summary
Modifier and TypeMethodDescriptionUnmarshaller<HttpEntity,
org.apache.pekko.stream.scaladsl.Source<ServerSentEvent, org.apache.pekko.NotUsed>> fromEventsStream
(int maxLineSize, int maxEventSize, boolean emitEmptyEvents) Unmarshaller<HttpEntity,
org.apache.pekko.stream.scaladsl.Source<ServerSentEvent, org.apache.pekko.NotUsed>> fromEventsStream
(org.apache.pekko.actor.ActorSystem system) Lets anHttpEntity
with atext/event-stream
media type be unmarshalled to a source ofServerSentEvent
s.Unmarshaller<HttpEntity,
org.apache.pekko.stream.scaladsl.Source<ServerSentEvent, org.apache.pekko.NotUsed>> fromEventsStream
(ServerSentEventSettings settings) Lets anHttpEntity
with atext/event-stream
media type be unmarshalled to a source ofServerSentEvent
s.
-
Method Details
-
fromEventsStream
Unmarshaller<HttpEntity,org.apache.pekko.stream.scaladsl.Source<ServerSentEvent, fromEventsStreamorg.apache.pekko.NotUsed>> (org.apache.pekko.actor.ActorSystem system) Lets anHttpEntity
with atext/event-stream
media type be unmarshalled to a source ofServerSentEvent
s.- Parameters:
system
- (undocumented)- Returns:
- (undocumented)
-
fromEventsStream
Unmarshaller<HttpEntity,org.apache.pekko.stream.scaladsl.Source<ServerSentEvent, fromEventsStreamorg.apache.pekko.NotUsed>> (ServerSentEventSettings settings) Lets anHttpEntity
with atext/event-stream
media type be unmarshalled to a source ofServerSentEvent
s.- Parameters:
settings
- overrides the default unmarshalling behavior.- Returns:
- (undocumented)
-
fromEventsStream
Unmarshaller<HttpEntity,org.apache.pekko.stream.scaladsl.Source<ServerSentEvent, fromEventsStreamorg.apache.pekko.NotUsed>> (int maxLineSize, int maxEventSize, boolean emitEmptyEvents)
-