|
Class Jabber::Protocol::Message |
|
| Methods |
| Attributes |
| [RW] | :body | |
| [RW] | :error | |
| [RW] | :errorcode | |
| [RW] | :from | |
| [RW] | :id | |
| [RW] | :oobData | |
| [RW] | :subject | |
| [RW] | :thread | |
| [RW] | :to | |
| [RW] | :type | |
| [RW] | :x | |
| [RW] | :xhtml |
| Public Class methods |
| from_element(session, element) src |
Factory to build a Message from an XMLElement
| session: | [Jabber::Session] The Jabber session instance |
| element: | [Jabber::Protocol::ParsedXMLElement] The received XML object |
| return: | [Jabber::Protocol::Message] The newly created Message object |
| new(to, type=NORMAL) src |
Creates a Message
| to: | [String | Jabber::JID] The jabber id to send this message to (or from) |
| type: | [Integer=NORMAL] The type of message...Message::(NORMAL, CHAT, GROUPCHAT, HEADLINE) |
| Public Instance methods |
| set_body(body) src |
Chaining method...sets the body of the message
| body: | [String] The message body |
| return: | [Jabber::Protocol::Message] The current Message object |
| set_subject(subject) src |
Chaining method...sets the subject of the message
| subject: | [String] The message subject |
| return: | [Jabber::Protocol::Message] The current Message object |
| set_xhtml(xhtml) src |
Chaining method...sets the XHTML body of the message
| body: | [String] The message body |
| return: | [Jabber::Protocol::Message] The current message object |
| set_thread(thread) src |
Chaining method...sets the thread of the message
| thread: | [String] The message thread id |
| return: | [Jabber::Protocol::Message] The current Message object |
| set_outofband(data) src |
Chaining method...sets the OOB data of the message
| data: | [String] The message OOB data |
| return: | [Jabber::Protocol::Message] The current Message object |
| set_x(x) src |
Chaining method...sets the extended data of the message
| x: | [String] The message x data |
| return: | [Jabber::Protocol::Message] The current Message object |
| set_error(code,reason) src |
Sets an error code to be returned(chaining method)
| code: | [Integer] the jabber error code |
| reason: | [String] Why the error was reported |
| return: | [Jabber::Protocol::Message] The current Message object |
| send(wait=false, &block) src |
Sends the message to the Jabber service for delivery
| wait: | [Boolean = false] Wait for reply before return? |
| &block: | [Block] A block to process the message replies |
| session=(session) src |
Sets the session instance
| session: | [Jabber::Session] The session instance |
| return: | [Jabber::Protocol::Message] The current Message object |
| reply() src |
Builds a reply to an existing message by setting:
| return: | [Jabber::Protocol::Message] The reply message |
| to_xml() src |
Generates XML that complies with the Jabber protocol for sending the message through the Jabber service.
| return: | [String] The XML string. |
| to_s() src |
see to_xml