|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.JabberMessage
com.echomine.jabber.JabberJDOMMessage
com.echomine.jabber.AbstractJabberMessage
com.echomine.jabber.JabberIQMessage
com.echomine.jabber.msg.BrowseIQMessage
public class BrowseIQMessage
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
,
ServiceItemsIQMessage
Field Summary |
---|
Fields inherited from class com.echomine.jabber.JabberIQMessage |
---|
TYPE_GET, TYPE_RESULT, TYPE_SET |
Fields inherited from class com.echomine.jabber.AbstractJabberMessage |
---|
TYPE_ERROR |
Fields inherited from class com.echomine.jabber.JabberMessage |
---|
messageID |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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)
|
Methods inherited from class com.echomine.jabber.AbstractJabberMessage |
---|
getErrorMessage, getFrom, getTo, getType, isError, setErrorMessage, setFrom, setTo, setType |
Methods inherited from class com.echomine.jabber.JabberJDOMMessage |
---|
getDOM, getXMLOutputter, setMessageID, toString |
Methods inherited from class com.echomine.jabber.JabberMessage |
---|
getMessageID, getReplyMessage, getTimeout, getXMessage, getXMessages, interrupt, isReplyRequired, isSendXMessages, isSynchronized, replyReceived, setReplyRequired, setSendXMessages, setSynchronized, setTimeout, setXMessage, setXMessages |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BrowseIQMessage(java.lang.String type, java.lang.String jtype) throws ParseException
ParseException
- if the jid category/subtype is not in the proper formatpublic BrowseIQMessage()
Method Detail |
---|
public JIDType getJIDType()
public void setJIDType(JIDType jidtype)
public int getMessageType()
JabberJDOMMessage
getMessageType
in class JabberIQMessage
JabberCode
public JabberMessage parse(JabberMessageParser parser, Element msgTree) throws ParseException
parse
in interface JabberMessageParsable
parse
in class AbstractJabberMessage
ParseException
public java.lang.String encode() throws ParseException
encode
in class JabberJDOMMessage
ParseException
- if something went wrong during encoding
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |