public class OOBIQMessage extends JabberIQMessage implements JabberCode
Current Implementation: JEP-0066 Version 1.0
TYPE_GET, TYPE_RESULT, TYPE_SETTYPE_ERRORmessageIDMSG_CHAT, MSG_INIT, MSG_IQ, MSG_IQ_AGENTS, MSG_IQ_AUTH, MSG_IQ_BROWSE, MSG_IQ_DISCO_INFO, MSG_IQ_DISCO_ITEMS, MSG_IQ_GATEWAY, MSG_IQ_LAST, MSG_IQ_OOB, MSG_IQ_PRIVATE, MSG_IQ_REGISTER, MSG_IQ_ROSTER, MSG_IQ_SEARCH, MSG_IQ_TIME, MSG_IQ_VACATION, MSG_IQ_VCARD, MSG_IQ_VERSION, MSG_IQ_XMLRPC, MSG_PRESENCE, MSG_UNKNOWN, MSG_X_DATA, MSG_X_DELAY, MSG_X_EVENT, MSG_X_EXPIRE, MSG_X_OOB, MSG_X_PGP_ENCRYPTED, MSG_X_PGP_SIGNED, MSG_X_ROSTER, PARSER_CHAT, PARSER_IQ, PARSER_IQ_AGENTS, PARSER_IQ_AUTH, PARSER_IQ_BROWSE, PARSER_IQ_DISCO_INFO, PARSER_IQ_DISCO_ITEMS, PARSER_IQ_GATEWAY, PARSER_IQ_LAST, PARSER_IQ_OOB, PARSER_IQ_PRIVATE, PARSER_IQ_REGISTER, PARSER_IQ_ROSTER, PARSER_IQ_SEARCH, PARSER_IQ_TIME, PARSER_IQ_VACATION, PARSER_IQ_VCARD, PARSER_IQ_VERSION, PARSER_IQ_XMLRPC, PARSER_PRESENCE, PARSER_X_DATA, PARSER_X_DELAY, PARSER_X_EVENT, PARSER_X_EXPIRE, PARSER_X_OOB, PARSER_X_PGP_ENCRYPTED, PARSER_X_PGP_SIGNED, PARSER_X_ROSTER, XMLNS_CHAT, XMLNS_ERROR_STANZA, XMLNS_ERROR_STREAM, XMLNS_IQ, XMLNS_IQ_AGENTS, XMLNS_IQ_AUTH, XMLNS_IQ_BROWSE, XMLNS_IQ_DISCO_INFO, XMLNS_IQ_DISCO_ITEMS, XMLNS_IQ_GATEWAY, XMLNS_IQ_LAST, XMLNS_IQ_OOB, XMLNS_IQ_PRIVATE, XMLNS_IQ_REGISTER, XMLNS_IQ_ROSTER, XMLNS_IQ_SEARCH, XMLNS_IQ_TIME, XMLNS_IQ_VACATION, XMLNS_IQ_VCARD, XMLNS_IQ_VERSION, XMLNS_IQ_XMLRPC, XMLNS_PRESENCE, XMLNS_STREAM, XMLNS_X_DATA, XMLNS_X_DELAY, XMLNS_X_EVENT, XMLNS_X_EXPIRE, XMLNS_X_OOB, XMLNS_X_PGP_ENCRYPTED, XMLNS_X_PGP_SIGNED, XMLNS_X_ROSTER| Constructor and Description |
|---|
OOBIQMessage()
defaults to iq type set to initiate a request
|
OOBIQMessage(java.lang.String type)
this constructor is for messages with type.
|
| Modifier and Type | Method and Description |
|---|---|
static OOBIQMessage |
createNotAcceptableErrorMessage(JID to,
java.lang.String msgId)
convenience method to create a OOBIQMessage that sends back a Not Acceptable Error Message to the
originator of the OOBIQRequest.
|
static OOBIQMessage |
createNotFoundErrorMessage(JID to,
java.lang.String msgId)
creates a request to notify the remote client that the resource at the URL was not
found or cannot be retrieved.
|
static OOBIQMessage |
createSendUrlMessage(JID to,
java.lang.String url,
java.lang.String desc)
creates a request to notify the remote client to download a file.
|
static OOBIQMessage |
createSuccessMessage(JID to,
java.lang.String msgId)
Creates a success message to send to the remote user notifying that file has been successfully transferred
|
java.lang.String |
encode()
The default encoding will serialize the DOM Tree.
|
java.lang.String |
getDescription() |
int |
getMessageType()
the default message type is unknown.
|
java.lang.String |
getUrl() |
JabberMessage |
parse(JabberMessageParser parser,
Element msgTree)
parses the message.
|
void |
setDescription(java.lang.String description)
sets the description attached to the url
|
void |
setUrl(java.lang.String url)
sets the URL for the file to be downloaded
|
getErrorMessage, getFrom, getTo, getType, isError, setErrorMessage, setFrom, setTo, setTypegetDOM, getXMLOutputter, setMessageID, toStringgetMessageID, getReplyMessage, getTimeout, getXMessage, getXMessages, interrupt, isReplyRequired, isSendXMessages, isSynchronized, replyReceived, setReplyRequired, setSendXMessages, setSynchronized, setTimeout, setXMessage, setXMessagespublic OOBIQMessage(java.lang.String type)
public OOBIQMessage()
public JabberMessage parse(JabberMessageParser parser, Element msgTree) throws ParseException
AbstractJabberMessageparse in interface JabberMessageParsableparse in class AbstractJabberMessageParseExceptionpublic java.lang.String getUrl()
public java.lang.String getDescription()
public void setUrl(java.lang.String url)
public void setDescription(java.lang.String description)
public int getMessageType()
JabberJDOMMessagegetMessageType in class JabberIQMessageJabberCodepublic java.lang.String encode()
throws ParseException
JabberJDOMMessageencode in class JabberJDOMMessageParseException - if something went wrong during encodingpublic static OOBIQMessage createSuccessMessage(JID to, java.lang.String msgId)
to - the recipient jid to send the message tomsgId - the message ID of the original request messagepublic static OOBIQMessage createSendUrlMessage(JID to, java.lang.String url, java.lang.String desc)
to - the recipient jid to send the message tourl - the url of the file to be transferreddesc - an optional description attached with the url. Null if none.public static OOBIQMessage createNotFoundErrorMessage(JID to, java.lang.String msgId)
to - the recipient jid to send the message tomsgId - the message id of the original requestpublic static OOBIQMessage createNotAcceptableErrorMessage(JID to, java.lang.String msgId)
to - the recipient JID to receive this messagemsgId - the message thread ID associated with the first OOB requestCopyright © 2001-2005 Echomine. All Rights Reserved.