org.gbanga.api
Class Message

java.lang.Object
  extended by org.gbanga.api.Message

public class Message
extends java.lang.Object

A message is a textual information sent from a sender to a recipient.

Details about JSON serialization

For the JSON object serialization, the field names are used. Eg.

 {
   id: 82340,
   sentTime: 1142982000000,
   read: false,
   sender: { name: "some name" }
 }
 

Fields annotated with PrimaryKey are used, if not the whole object is sent. HideIfNull indicates that the field is not sent at all, if the value is not set.

Author:
Matthias

Field Summary
 java.lang.String content
          The verbose content.
 long id
          A unique id for this message.
 boolean incoming
          Indicates if the message is incoming (true) or outgoing (false).
 boolean read
          A flag to indicate if the message was read by the recipient, assumably.
 Entity receiver
          The receiving Player or Gbangoo.
 Entity sender
          The sending Player or Gbangoo.
 long sentTime
          The timestamp when the message was sent.
 Cell target
          The receiving cell (if it is a cell shout).
 
Constructor Summary
Message()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

content

public java.lang.String content
The verbose content.


id

@PrimaryKey
public long id
A unique id for this message.


incoming

public boolean incoming
Indicates if the message is incoming (true) or outgoing (false).


read

public boolean read
A flag to indicate if the message was read by the recipient, assumably.


receiver

@HideIfNull
public Entity receiver
The receiving Player or Gbangoo.


sender

@HideIfNull
public Entity sender
The sending Player or Gbangoo.


sentTime

public long sentTime
The timestamp when the message was sent.


target

@HideIfNull
public Cell target
The receiving cell (if it is a cell shout).

Constructor Detail

Message

public Message()