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
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
static class
static final class
A strictBinaryMessage
that contains the complete data as apekko.util.ByteString
.static class
-
Method Summary
Modifier and TypeMethodDescriptionasScala()
org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString,
?> The contents of this message as a stream.org.apache.pekko.stream.javadsl.Source<org.apache.pekko.util.ByteString,
?> Java APItoStrict
(long timeoutMillis, org.apache.pekko.stream.Materializer materializer) scala.concurrent.Future<BinaryMessage.Strict>
toStrict
(scala.concurrent.duration.FiniteDuration timeout, org.apache.pekko.stream.Materializer fm) Collects all possible parts and returns a potentially future Strict Message for easier processing.
-
Method Details
-
dataStream
org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.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, org.apache.pekko.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
org.apache.pekko.stream.javadsl.Source<org.apache.pekko.util.ByteString,?> getStreamedData()Java API -
asScala
BinaryMessage asScala() -
toStrict
CompletionStage<BinaryMessage.Strict> toStrict(long timeoutMillis, org.apache.pekko.stream.Materializer materializer)
-