Interface Message
public interface Message
Asynchronous message from another client.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the default value or null if this message has no default value.The user that sent the message.Return a message value or null if this message has no value for this key.boolean
Returns true if this was a broadcast message or false if it was sent only to the current user.
-
Field Details
-
KEY_DEFAULT_VALUE
- See Also:
-
-
Method Details
-
getSender
MTUserHeader getSender()The user that sent the message.- Returns:
- The user that sent the message.
-
isBroadcast
boolean isBroadcast()Returns true if this was a broadcast message or false if it was sent only to the current user.- Returns:
- true if this was a broadcast message or false if it was sent only to the current user.
-
getDefaultValue
String getDefaultValue()Returns the default value or null if this message has no default value. This is equivalent to getValue(KEY_DEFAULT_VALUE).- Returns:
- the default value or null if this message has no default value.
-
getValue
Return a message value or null if this message has no value for this key.- Parameters:
key
- The key to get the value for.- Returns:
- a message value or null if this message has no value for this key.
-