public abstract class AbstractMessage extends java.lang.Object implements Message
Message
in order to make it
easier for implementers to provide complete solutions while focusing on
implementation-specific details.Modifier | Constructor and Description |
---|---|
protected |
AbstractMessage(java.lang.String content,
java.lang.String contentType,
java.lang.String encoding,
java.lang.String subject) |
protected |
AbstractMessage(java.lang.String content,
java.lang.String contentType,
java.lang.String encoding,
java.lang.String subject,
java.lang.String messageUID) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
createMessageUID() |
java.lang.String |
getContent()
Returns the content of this message if representable in text form or null
if this message does not contain text data.
|
java.lang.String |
getContentType()
Returns the MIME type for the message content.
|
java.lang.String |
getEncoding()
Returns the MIME content encoding of this message.
|
java.lang.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.
|
java.lang.String |
getSubject()
Returns the subject of this message or null if the message contains no
subject.
|
protected void |
setContent(java.lang.String content) |
protected AbstractMessage(java.lang.String content, java.lang.String contentType, java.lang.String encoding, java.lang.String subject)
protected AbstractMessage(java.lang.String content, java.lang.String contentType, java.lang.String encoding, java.lang.String subject, java.lang.String messageUID)
protected java.lang.String createMessageUID()
public final java.lang.String getContent()
The implementation is final because it caches the raw data of the content.
getContent
in interface Message
public java.lang.String getContentType()
Message
getContentType
in interface Message
public final java.lang.String getEncoding()
The implementation is final because of the presumption it can set the encoding.
getEncoding
in interface Message
public java.lang.String getMessageUID()
Message
getMessageUID
in interface Message
public byte[] getRawData()
Message
getRawData
in interface Message
public int getSize()
Message
public java.lang.String getSubject()
Message
getSubject
in interface Message
protected void setContent(java.lang.String content)
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.