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 SummaryConstructors
- 
Method SummaryModifier 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- 
Messagepublic Message()
 
- 
- 
Method Details- 
adapt
- 
isTextpublic 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)
 
- 
isStrictpublic abstract boolean isStrict()Is this message a strict one?
- 
asTextMessageReturns this TextMessage if it is a text message, throws otherwise.- Returns:
- (undocumented)
 
- 
asBinaryMessageReturns this BinaryMessage if it is a binary message, throws otherwise.- Returns:
- (undocumented)
 
- 
asScala
 
-