public class Message
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Message.MessageType
Represents the possible message types
|
Constructor and Description |
---|
Message(int typeId,
java.lang.String username,
java.lang.String message)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMessage()
Gets the message
|
long |
getTime()
Gets the time the message was sent
|
Message.MessageType |
getType()
Gets the type of this message
|
int |
getTypeId()
Gets the type id of this message
|
java.lang.String |
getUsername()
Gets the username of the source of this message
|
public Message(int typeId, java.lang.String username, java.lang.String message)
typeId
- The message type idusername
- The username of the sourcemessage
- The messagepublic java.lang.String getUsername()
public Message.MessageType getType()
public int getTypeId()
public java.lang.String getMessage()
public long getTime()