Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface Message

All Known Implementing Classes:
AbstractMessage, MessageDictImpl, MessageGibberishImpl, MessageIcqImpl, MessageIrcImpl, MessageJabberImpl, MessageMsnImpl, MessageRssImpl, MessageSipImpl, MessageSSHImpl, MessageYahooImpl, MessageZeroconfImpl, MockMessage

public interface Message

Used to access the content of instant messages that are sent or received via the instant messaging operation set.

This class provides easy access to the content and key fields of an instant Message. Content types are represented using MIME types. [IETF RFC 2045-2048].

Messages are created through the OperationSetBaicInstanceMessaging operation set.

All messages have message ids that allow the underlying implementation to notify the user of their successful delivery.

Author:
Emil Ivov

Method Summary
 String getContent()
          Returns the content of this message if representable in text form or null if this message does not contain text data.
 String getContentType()
          Returns the MIME type for the message content.
 String getEncoding()
          Returns the MIME content encoding of this message.
 String getMessageUID()
          Returns a unique identifier of this message.
 byte[] getRawData()
          Get the raw/binary content of an instant message.
 int getSize()
          Returns the size of the content stored in this message.
 String getSubject()
          Returns the subject of this message or null if the message contains no subject.
 

Method Detail

getContent

String getContent()
Returns the content of this message if representable in text form or null if this message does not contain text data.

Returns:
a String containing the content of this message or null if the message does not contain data representable in text form.

getContentType

String getContentType()
Returns the MIME type for the message content.

Returns:
a String containing the mime type of the message contant.

getRawData

byte[] getRawData()
Get the raw/binary content of an instant message.

Returns:
a byte[] array containing message bytes.

getEncoding

String getEncoding()
Returns the MIME content encoding of this message.

Returns:
a String indicating the MIME encoding of this message.

getSubject

String getSubject()
Returns the subject of this message or null if the message contains no subject.

Returns:
the subject of this message or null if the message contains no subject.

getSize

int getSize()
Returns the size of the content stored in this message.

Returns:
an int indicating the number of bytes that this message contains.

getMessageUID

String getMessageUID()
Returns a unique identifier of this message.

Returns:
a String that uniquely represents this message in the scope of this protocol.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.