Package akka.http.javadsl.model.ws
Class Message
- java.lang.Object
-
- akka.http.javadsl.model.ws.Message
-
- Direct Known Subclasses:
BinaryMessage,TextMessage
public abstract class Message extends java.lang.ObjectRepresents a WebSocket message. A message can either be a binary message or a text message.
-
-
Constructor Summary
Constructors Constructor Description Message()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Messageadapt(Message msg)abstract BinaryMessageasBinaryMessage()Returns this BinaryMessage if it is a binary message, throws otherwise.abstract MessageasScala()abstract TextMessageasTextMessage()Returns 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?
-
-
-
Method Detail
-
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
public abstract TextMessage asTextMessage()
Returns this TextMessage if it is a text message, throws otherwise.- Returns:
- (undocumented)
-
asBinaryMessage
public abstract BinaryMessage asBinaryMessage()
Returns this BinaryMessage if it is a binary message, throws otherwise.- Returns:
- (undocumented)
-
asScala
public abstract Message asScala()
-
-