public class ChatMessage extends ChatInteraction
Modifier and Type | Field and Description |
---|---|
private Lamport |
lamportTime |
private int |
sender |
private Utils.SyncType |
syncMethod |
private java.lang.String |
text |
private long |
timestamp |
private VectorClock |
vectorTime |
eventType, jsonMap
Constructor and Description |
---|
ChatMessage() |
ChatMessage(Utils.ChatEventType eventType,
int sender,
java.lang.String text,
Lamport lamportTime,
VectorClock vectorTime,
long timestamp,
Utils.SyncType syncMethod) |
Modifier and Type | Method and Description |
---|---|
void |
extractFromJSON(JSONObject json) |
boolean |
isDeliverable() |
void |
prepareJSON() |
java.lang.String |
toString() |
private java.lang.String text
private int sender
private long timestamp
private Lamport lamportTime
private VectorClock vectorTime
private Utils.SyncType syncMethod
public ChatMessage()
public ChatMessage(Utils.ChatEventType eventType, int sender, java.lang.String text, Lamport lamportTime, VectorClock vectorTime, long timestamp, Utils.SyncType syncMethod)
public boolean isDeliverable()
public java.lang.String toString()
toString
in class java.lang.Object
public void prepareJSON()
prepareJSON
in class ChatInteraction
public void extractFromJSON(JSONObject json)
extractFromJSON
in class ChatInteraction