Class Message
java.lang.Object
org.apache.pekko.http.javadsl.model.ws.Message
- Direct Known Subclasses:
BinaryMessage,TextMessage
Represents a WebSocket message. A message can either be a binary message or a text message.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Messageabstract BinaryMessageReturns this BinaryMessage if it is a binary message, throws otherwise.abstract MessageasScala()abstract TextMessageReturns this TextMessage if it is a text message, throws otherwise.abstract booleanisStrict()Is this message a strict one?abstract booleanisText()Is this message a text message?
-
Constructor Details
-
Message
public Message()
-
-
Method Details
-
adapt
-
isText
public abstract boolean isText()Is this message a text message? If true,asTextMessage()will return this text message, if false,asBinaryMessage()will return this binary message.- Returns:
- (undocumented)
-
isStrict
public abstract boolean isStrict()Is this message a strict one? -
asTextMessage
Returns this TextMessage if it is a text message, throws otherwise.- Returns:
- (undocumented)
-
asBinaryMessage
Returns this BinaryMessage if it is a binary message, throws otherwise.- Returns:
- (undocumented)
-
asScala
-