Package org.jivesoftware.smack.packet
Interface MessageView
- All Superinterfaces:
StanzaView,XmlLangElement
- All Known Implementing Classes:
Message,MessageBuilder
-
Method Summary
Modifier and TypeMethodDescriptiondefault Set<Message.Body> Returns a set of all bodies in this Message, including the default message body accessible fromgetBody().default StringgetBody()Returns the default body of the message, or null if the body has not been set.default StringReturns the body corresponding to the language.Returns all the languages being used for the bodies, not including the default body.default Message.BodygetMessageBody(String language) default Message.SubjectgetMessageSubject(String language) default StringReturns the default subject of the message, or null if the subject has not been set.default StringgetSubject(String language) Returns the subject corresponding to the language.Returns all the languages being used for the subjects, not including the default subject.default Set<Message.Subject> Returns a set of all subjects in this Message, including the default message subject accessible fromgetSubject().default StringReturns the thread id of the message, which is a unique identifier for a sequence of "chat" messages.getType()Returns the type of the message.Methods inherited from interface org.jivesoftware.smack.packet.StanzaView
getError, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getFrom, getStanzaId, getTo, hasExtension, hasExtension, hasExtensionMethods inherited from interface org.jivesoftware.smack.packet.XmlLangElement
getLanguage
-
Method Details
-
getType
Message.Type getType()Returns the type of the message. If no type has been set this method will returnMessage.Type.normal.- Returns:
- the type of the message.
-
getSubject
Returns the default subject of the message, or null if the subject has not been set. The subject is a short description of message contents.The default subject of a message is the subject that corresponds to the message's language. (see
XmlLangElement.getLanguage()) or if no language is set to the applications default language (seeStanza.getDefaultLanguage()).- Returns:
- the subject of the message.
-
getSubject
Returns the subject corresponding to the language. If the language is null, the method result will be the same asgetSubject(). Null will be returned if the language does not have a corresponding subject.- Parameters:
language- the language of the subject to return.- Returns:
- the subject related to the passed in language.
-
getMessageSubject
-
getSubjects
Returns a set of all subjects in this Message, including the default message subject accessible fromgetSubject().- Returns:
- a collection of all subjects in this message.
-
getSubjectLanguages
Returns all the languages being used for the subjects, not including the default subject.- Returns:
- the languages being used for the subjects.
-
getBody
Returns the default body of the message, or null if the body has not been set. The body is the main message contents.The default body of a message is the body that corresponds to the message's language. (see
XmlLangElement.getLanguage()) or if no language is set to the applications default language (seeStanza.getDefaultLanguage()).- Returns:
- the body of the message.
-
getBody
Returns the body corresponding to the language. If the language is null, the method result will be the same asgetBody(). Null will be returned if the language does not have a corresponding body.- Parameters:
language- the language of the body to return.- Returns:
- the body related to the passed in language.
- Since:
- 3.0.2
-
getMessageBody
-
getBodies
Returns a set of all bodies in this Message, including the default message body accessible fromgetBody().- Returns:
- a collection of all bodies in this Message.
- Since:
- 3.0.2
-
getBodyLanguages
Returns all the languages being used for the bodies, not including the default body.- Returns:
- the languages being used for the bodies.
- Since:
- 3.0.2
-
getThread
Returns the thread id of the message, which is a unique identifier for a sequence of "chat" messages. If no thread id is set,nullwill be returned.- Returns:
- the thread id of the message, or
nullif it doesn't exist.
-