com.scooterframework.common.util
Class Message

java.lang.Object
  extended by com.scooterframework.common.util.Message
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ExpandedMessage

public class Message
extends java.lang.Object
implements java.io.Serializable

Message represents a general purpose message.

See Also:
Serialized Form

Field Summary
protected  java.lang.String content
          The message content.
protected  java.util.Date createdAt
          Timestamp for this mesasge.
protected  java.lang.String id
          The message id.
 
Constructor Summary
Message(java.lang.String content)
          Construct a message.
Message(java.lang.String id, java.lang.String content)
          Construct a message.
 
Method Summary
 java.lang.String getContent()
           
 java.lang.String getId()
           
 java.util.Date getTimestamp()
           
 java.lang.String toString()
          Returns as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected java.lang.String id

The message id.


content

protected java.lang.String content

The message content.


createdAt

protected java.util.Date createdAt

Timestamp for this mesasge.

Constructor Detail

Message

public Message(java.lang.String content)

Construct a message.

Parameters:
content - Message content

Message

public Message(java.lang.String id,
               java.lang.String content)

Construct a message.

Parameters:
id - an identifier that the message is tied to
content - Message content
Method Detail

getId

public java.lang.String getId()

getContent

public java.lang.String getContent()

getTimestamp

public java.util.Date getTimestamp()

toString

public java.lang.String toString()

Returns as a string.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this message
See Also:
Object.toString()