public abstract class WebMessage extends ActorMessage implements FromMessage
A message that is received from or can be set to a web client (via HTTP or WebSockets). The message has either a text body
or a binary
body (but not both).
Constructor and Description |
---|
WebMessage() |
Modifier and Type | Method and Description |
---|---|
protected String |
contentString() |
abstract ByteBuffer |
getByteBufferBody()
The message’s binary body, if it has one;
null otherwise. |
abstract ActorRef<? extends WebMessage> |
getFrom()
The actor that sent this message.
|
abstract String |
getStringBody()
The message’s text body, if it has one;
null otherwise. |
toString
public abstract ActorRef<? extends WebMessage> getFrom()
The actor that sent this message. This can be a virtual actor representing the web client.
getFrom
in interface FromMessage
public abstract String getStringBody()
The message’s text body, if it has one; null
otherwise.
public abstract ByteBuffer getByteBufferBody()
The message’s binary body, if it has one; null
otherwise.
protected String contentString()
contentString
in class ActorMessage