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 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.
  • 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)