com.voiceclearly.api.chat
Class Message

java.lang.Object
  extended by com.voiceclearly.api.chat.Message

public class Message
extends java.lang.Object

Represents chat messages. A message can be one of several types: For each message type, different message fields are typically used as follows:


Constructor Summary
Message()
          Class constructor that creates a new chat message.
Message(com.voiceclearly.jingle.Message msg)
          Class constructor that wraps a jingle chat message.
 
Method Summary
 java.lang.String getBody()
          Returns the body of the message, or null if the body has not been set.
 com.voiceclearly.jingle.Message getJingleMessage()
          Method to return a jingle message.
 java.lang.String getSubject()
          Returns the subject of the message, or null if the subject has not been set.
 java.lang.String getThread()
          Returns the thread id of the message, which is a unique identifier for a specific chat.
 void setBody(java.lang.String body)
          Sets the body of the message.
 void setSubject(java.lang.String subject)
          Sets the subject of the message.
 void setThread(java.lang.String thread)
          Sets the thread id of the message, which is a unique identifier for chat
 java.lang.String toXML()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message()
Class constructor that creates a new chat message.


Message

public Message(com.voiceclearly.jingle.Message msg)
Class constructor that wraps a jingle chat message. This method is typically not used by api clients directly.

Parameters:
msg -
Method Detail

getJingleMessage

public com.voiceclearly.jingle.Message getJingleMessage()
Method to return a jingle message. Typically not used by client api users.

Returns:
Message

getSubject

public java.lang.String getSubject()
Returns the subject of the message, or null if the subject has not been set.

Returns:
the subject of the message.

setSubject

public void setSubject(java.lang.String subject)
Sets the subject of the message. The subject is a short description of message contents.

Parameters:
subject - the subject of the message.

getBody

public java.lang.String getBody()
Returns the body of the message, or null if the body has not been set.

Returns:
the body of the message.

setBody

public void setBody(java.lang.String body)
Sets the body of the message.

Parameters:
body - the body of the message.

getThread

public java.lang.String getThread()
Returns the thread id of the message, which is a unique identifier for a specific chat.

Returns:
the thread id of the message

setThread

public void setThread(java.lang.String thread)
Sets the thread id of the message, which is a unique identifier for chat

Parameters:
thread - the thread id of the message.

toXML

public java.lang.String toXML()
Returns:
returns the xml string representation of the message.