Package akka.http.scaladsl.model.ws
Interface TextMessage
-
- All Superinterfaces:
Message
- All Known Implementing Classes:
TextMessage.Streamed
,TextMessage.Strict
public interface TextMessage extends Message
Represents a WebSocket text message. A text message can either be aTextMessage.Strict
in which case the complete data is already available or it can beTextMessage.Streamed
in which casetextStream
will return a Source streaming the data as it comes in.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TextMessage.Streamed
static class
TextMessage.Streamed$
static class
TextMessage.Strict
A strictTextMessage
that contains the complete data as aString
.static class
TextMessage.Strict$
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TextMessage
asScala()
akka.stream.javadsl.Source<java.lang.String,?>
getStreamedText()
Java APIakka.stream.scaladsl.Source<java.lang.String,?>
textStream()
The contents of this message as a stream.java.util.concurrent.CompletionStage<TextMessage.Strict>
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 Detail
-
textStream
akka.stream.scaladsl.Source<java.lang.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<java.lang.String,?> getStreamedText()
Java API
-
asScala
TextMessage asScala()
-
toStrict
java.util.concurrent.CompletionStage<TextMessage.Strict> toStrict(long timeoutMillis, akka.stream.Materializer materializer)
-
-