org.eclipse.ecf.presence.im
Class ChatMessage

java.lang.Object
  extended by org.eclipse.ecf.presence.IMMessage
      extended by org.eclipse.ecf.presence.im.ChatMessage
All Implemented Interfaces:
java.io.Serializable, org.eclipse.core.runtime.IAdaptable, IIMMessage, IChatMessage
Direct Known Subclasses:
XHTMLChatMessage

public class ChatMessage
extends IMMessage
implements IChatMessage

Chat message concrete class. Implements IChatMessage.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.ecf.presence.im.IChatMessage
IChatMessage.Type
 
Field Summary
protected  java.lang.String body
           
protected  java.util.Map properties
           
protected  java.lang.String subject
           
protected  ID threadID
           
protected  IChatMessage.Type type
           
 
Fields inherited from class org.eclipse.ecf.presence.IMMessage
fromID
 
Constructor Summary
ChatMessage(ID fromID, IChatMessage.Type type, java.lang.String subject, java.lang.String body, java.util.Map properties)
           
ChatMessage(ID fromID, ID threadID, IChatMessage.Type type, java.lang.String subject, java.lang.String body, java.util.Map properties)
           
ChatMessage(ID fromID, ID threadID, java.lang.String subject, java.lang.String body, java.util.Map properties)
           
ChatMessage(ID fromID, java.lang.String body)
           
ChatMessage(ID fromID, java.lang.String body, java.util.Map properties)
           
ChatMessage(ID fromID, java.lang.String subject, java.lang.String body, java.util.Map properties)
           
 
Method Summary
 java.lang.String getBody()
          Get the message body for this message.
 java.util.Map getProperties()
          Get properties associated with this chat message
 java.lang.String getSubject()
          Get subject for this message.
 ID getThreadID()
          Get thread ID for this message.
 IChatMessage.Type getType()
          Get type for this message.
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ecf.presence.IMMessage
getAdapter, getFromID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ecf.presence.IIMMessage
getFromID
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

threadID

protected ID threadID

type

protected IChatMessage.Type type

subject

protected java.lang.String subject

body

protected java.lang.String body

properties

protected java.util.Map properties
Constructor Detail

ChatMessage

public ChatMessage(ID fromID,
                   ID threadID,
                   IChatMessage.Type type,
                   java.lang.String subject,
                   java.lang.String body,
                   java.util.Map properties)

ChatMessage

public ChatMessage(ID fromID,
                   ID threadID,
                   java.lang.String subject,
                   java.lang.String body,
                   java.util.Map properties)

ChatMessage

public ChatMessage(ID fromID,
                   IChatMessage.Type type,
                   java.lang.String subject,
                   java.lang.String body,
                   java.util.Map properties)

ChatMessage

public ChatMessage(ID fromID,
                   java.lang.String subject,
                   java.lang.String body,
                   java.util.Map properties)

ChatMessage

public ChatMessage(ID fromID,
                   java.lang.String body,
                   java.util.Map properties)

ChatMessage

public ChatMessage(ID fromID,
                   java.lang.String body)
Method Detail

getBody

public java.lang.String getBody()
Description copied from interface: IChatMessage
Get the message body for this message. Will not be null.

Specified by:
getBody in interface IChatMessage
Returns:
String content/body of this message. Will not be null.

getSubject

public java.lang.String getSubject()
Description copied from interface: IChatMessage
Get subject for this message. If subjects are not supported, null will be returned.

Specified by:
getSubject in interface IChatMessage
Returns:
String that is the subject of this message. If subjects are not supported by provider, will return null.

getThreadID

public ID getThreadID()
Description copied from interface: IChatMessage
Get thread ID for this message. If thread IDs are not supported, null will be returned.

Specified by:
getThreadID in interface IChatMessage
Returns:
ID that identifies thread for this message. If threads are not supported by provider, will return null.

getType

public IChatMessage.Type getType()
Description copied from interface: IChatMessage
Get type for this message. Will not be null. Defaults to Type.CHAT.

Specified by:
getType in interface IChatMessage
Returns:
Type associated with this message. Defaults to Type.CHAT.

getProperties

public java.util.Map getProperties()
Description copied from interface: IChatMessage
Get properties associated with this chat message

Specified by:
getProperties in interface IChatMessage
Returns:
Map of properties. Will not be null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object