public class BrowseIQMessage extends JabberIQMessage
This message encapsulates all browsing-related messages. The new Browsing framework for Jabber allows you to retrieve any information regarding a service/conference/application/etc. It gives your a way to retrieve information about a specific JID. For instance, if the jid is a user, browsing the user will return the services/functions supported by the client (ie. xhtml, pgp/encryption, oob file transfers, etc). Browsing to a server will return a list of agents/services that the server supports (ie. icq, conferencing, msn, irc, etc). Thus, the browsing framework become extremely generic.
Inside a browse result message, you will receive a list of services that the JID supports. You can further browse down to those internal list to obtain information about those services. The browsing framework is created in such a way as to be hierarchical (sort like a tree list in a GUI, ie. XML parent/child style). A service can be browsed until no further services are contained.
Notes on Implementation: Under most circumstances, the JID contained in the Browse message should be exactly the same as the To field in the IQ message. There is an exception. If the result message is from a chat conference room, then any messages received from the chat is under the conference room's JID for the IQ From Field. The JID inside the message will then be the user's JID.
There are a lot of complications with using the Browse message, it is suggested that you read the Jabber Browsing draft available at http://www.jabber.org for more information. Otherwise, you can simply use the provided convenience methods offered by the Jabber Service classes.
Current Implementation: JEP-0011 Version 1.0
ServiceInfoIQMessage,
ServiceItemsIQMessageTYPE_GET, TYPE_RESULT, TYPE_SETTYPE_ERRORmessageID| Constructor and Description |
|---|
BrowseIQMessage()
defaults to iq type get and jidtype of "service/jabber"
|
BrowseIQMessage(java.lang.String type,
java.lang.String jtype)
this constructor is for messages with type.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
encode()
overrides the encode so that we can transform all the data in this class into XML before sending it off
|
JIDType |
getJIDType() |
int |
getMessageType()
the default message type is unknown.
|
JabberMessage |
parse(JabberMessageParser parser,
Element msgTree)
parses the incoming message for the data
|
void |
setJIDType(JIDType jidtype) |
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 BrowseIQMessage(java.lang.String type,
java.lang.String jtype)
throws ParseException
ParseException - if the jid category/subtype is not in the proper formatpublic BrowseIQMessage()
public JIDType getJIDType()
public void setJIDType(JIDType jidtype)
public int getMessageType()
JabberJDOMMessagegetMessageType in class JabberIQMessageJabberCodepublic JabberMessage parse(JabberMessageParser parser, Element msgTree) throws ParseException
parse in interface JabberMessageParsableparse in class AbstractJabberMessageParseExceptionpublic java.lang.String encode()
throws ParseException
encode in class JabberJDOMMessageParseException - if something went wrong during encodingCopyright © 2001-2005 Echomine. All Rights Reserved.