Package akka.http.scaladsl.model.ws
Interface TextMessage
- All Superinterfaces:
Message
- All Known Implementing Classes:
TextMessage.Streamed
,TextMessage.Strict
Represents a WebSocket text message. A text message can either be a
TextMessage.Strict
in which case
the complete data is already available or it can be TextMessage.Streamed
in which case textStream
will return a Source streaming the data as it comes in.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
static class
static final class
A strictTextMessage
that contains the complete data as aString
.static class
-
Method Summary
Modifier and TypeMethodDescriptionasScala()
akka.stream.javadsl.Source<String,
?> Java APIakka.stream.scaladsl.Source<String,
?> The contents of this message as a stream.toStrict
(long timeoutMillis, akka.stream.Materializer materializer) scala.concurrent.Future<TextMessage.Strict>
toStrict
(scala.concurrent.duration.FiniteDuration timeout, akka.stream.Materializer fm) Collects all possible parts and returns a potentially future Strict Message for easier processing.
-
Method Details
-
textStream
akka.stream.scaladsl.Source<String,?> textStream()The contents of this message as a stream.- Returns:
- (undocumented)
-
toStrict
scala.concurrent.Future<TextMessage.Strict> toStrict(scala.concurrent.duration.FiniteDuration timeout, akka.stream.Materializer fm) Collects all possible parts and returns a potentially future Strict Message for easier processing. The Future is failed with an TimeoutException if the stream isn't completed after the given timeout.- Parameters:
timeout
- (undocumented)fm
- (undocumented)- Returns:
- (undocumented)
-
getStreamedText
akka.stream.javadsl.Source<String,?> getStreamedText()Java API -
asScala
TextMessage asScala() -
toStrict
CompletionStage<TextMessage.Strict> toStrict(long timeoutMillis, akka.stream.Materializer materializer)
-