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.Strictin which case the complete data is already available or it can beTextMessage.Streamedin which casetextStreamwill return a Source streaming the data as it comes in.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTextMessage.Streamedstatic classTextMessage.Streamed$static classTextMessage.StrictA strictTextMessagethat contains the complete data as aString.static classTextMessage.Strict$
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TextMessageasScala()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)
-
-