public final class Message extends AbstractMessage implements ServerStreamElement
<message/> element for the server namespace ('jabber:server').AbstractMessage.Body, AbstractMessage.Subject, AbstractMessage.Type| Constructor and Description |
|---|
Message() |
Message(Jid to)
Constructs an empty message.
|
Message(Jid to,
AbstractMessage.Type type)
Constructs a message with a type.
|
Message(Jid to,
AbstractMessage.Type type,
Collection<AbstractMessage.Body> bodies,
Collection<AbstractMessage.Subject> subjects,
String thread,
String parentThread,
String id,
Jid from,
String language,
Collection<Object> extensions,
StanzaError error)
Constructs a message with body and type.
|
Message(Jid to,
AbstractMessage.Type type,
String body)
Constructs a message with body and type.
|
Message(Jid to,
AbstractMessage.Type type,
String body,
String subject)
Constructs a message with body and type.
|
Message(Jid to,
AbstractMessage.Type type,
String body,
String subject,
String thread)
Constructs a message with body and type.
|
Message(Jid to,
AbstractMessage.Type type,
String body,
String subject,
String thread,
String parentThread,
String id,
Jid from,
String language,
Collection<Object> extensions,
StanzaError error)
Constructs a message with body and type.
|
| Modifier and Type | Method and Description |
|---|---|
Message |
createError(Condition condition)
Creates an error response for this stanza.
|
Message |
createError(StanzaError error)
Creates an error response for this stanza.
|
Message |
withFrom(Jid from)
Creates a copy of this stanza and adds a from attribute to it.
|
getBodies, getBody, getExtension, getExtensions, getParentThread, getSubject, getSubjects, getThread, getType, setBody, setParentThread, setSubject, setThread, setType, toStringpublic Message()
public Message(Jid to)
to - The recipient.public Message(Jid to, AbstractMessage.Type type)
to - The recipient.type - The message type.public Message(Jid to, AbstractMessage.Type type, String body)
to - The recipient.body - The message body.type - The message type.public Message(Jid to, AbstractMessage.Type type, String body, String subject)
to - The recipient.body - The message body.type - The message type.subject - The subject.public Message(Jid to, AbstractMessage.Type type, String body, String subject, String thread)
to - The recipient.body - The message body.type - The message type.subject - The subject.thread - The thread.public Message(Jid to, AbstractMessage.Type type, String body, String subject, String thread, String parentThread, String id, Jid from, String language, Collection<Object> extensions, StanzaError error)
to - The recipient.body - The message body.type - The message type.subject - The subject.thread - The thread.parentThread - The parent thread.from - The sender.id - The id.language - The language.extensions - The extensions.error - The error.public Message(Jid to, AbstractMessage.Type type, Collection<AbstractMessage.Body> bodies, Collection<AbstractMessage.Subject> subjects, String thread, String parentThread, String id, Jid from, String language, Collection<Object> extensions, StanzaError error)
to - The recipient.bodies - The message bodies.type - The message type.subjects - The subjects.thread - The thread.parentThread - The parent thread.from - The sender.id - The id.language - The language.extensions - The extensions.error - The error.public final Message createError(StanzaError error)
StanzacreateError in class Stanzaerror - The error which is appended to the stanza.Stanza.getError()public final Message createError(Condition condition)
StanzacreateError in class Stanzacondition - The error condition which is appended to the stanza.Stanza.getError()Copyright © 2014–2015 XMPP.rocks. All rights reserved.