Package akka.http.scaladsl.model.ws
Interface BinaryMessage
- All Superinterfaces:
Message
- All Known Implementing Classes:
BinaryMessage.Streamed
,BinaryMessage.Strict
Represents a WebSocket binary message. A binary message can either be
BinaryMessage.Strict
in which case
the complete data is already available or it can be BinaryMessage.Streamed
in which case dataStream
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 strictBinaryMessage
that contains the complete data as aByteString
.static class
-
Method Summary
Modifier and TypeMethodDescriptionasScala()
akka.stream.scaladsl.Source<akka.util.ByteString,
?> The contents of this message as a stream.akka.stream.javadsl.Source<akka.util.ByteString,
?> Java APItoStrict
(long timeoutMillis, akka.stream.Materializer materializer) scala.concurrent.Future<BinaryMessage.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
-
dataStream
akka.stream.scaladsl.Source<akka.util.ByteString,?> dataStream()The contents of this message as a stream.- Returns:
- (undocumented)
-
toStrict
scala.concurrent.Future<BinaryMessage.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)
-
getStreamedData
akka.stream.javadsl.Source<akka.util.ByteString,?> getStreamedData()Java API -
asScala
BinaryMessage asScala() -
toStrict
CompletionStage<BinaryMessage.Strict> toStrict(long timeoutMillis, akka.stream.Materializer materializer)
-