Package akka.http.scaladsl.model.ws
Interface BinaryMessage
-
- All Superinterfaces:
Message
- All Known Implementing Classes:
BinaryMessage.Streamed
,BinaryMessage.Strict
public interface BinaryMessage extends Message
Represents a WebSocket binary message. A binary message can either beBinaryMessage.Strict
in which case the complete data is already available or it can beBinaryMessage.Streamed
in which casedataStream
will return a Source streaming the data as it comes in.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
BinaryMessage.Streamed
static class
BinaryMessage.Streamed$
static class
BinaryMessage.Strict
A strictBinaryMessage
that contains the complete data as aByteString
.static class
BinaryMessage.Strict$
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BinaryMessage
asScala()
akka.stream.scaladsl.Source<akka.util.ByteString,?>
dataStream()
The contents of this message as a stream.akka.stream.javadsl.Source<akka.util.ByteString,?>
getStreamedData()
Java APIjava.util.concurrent.CompletionStage<BinaryMessage.Strict>
toStrict(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 Detail
-
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
java.util.concurrent.CompletionStage<BinaryMessage.Strict> toStrict(long timeoutMillis, akka.stream.Materializer materializer)
-
-