public class ServiceItemsIQMessage extends JabberIQMessage
Implementation class for working with the Items namespace of the JEP-0030 Service Discovery protocol. The service discovery protocol is a new protocol that will eventually replace the older JEP-0094 Agent Information and JEP-0011 Browsing specs.
Note that this JEP is still considered Experimental. Thus, the protocol may well not have been implemented on the server side. Even though the older Agents namespace is deprecated, it does not mean that you should stop using it. It also doesn't mean that you should use the new disco protocol judiciously without checking to make sure it is supported by the remote server. How would you know? For now, you will just have to try both and see what happens.
Read up on the list of categories, namespaces, and types at the Jabber Registry for an up-to-date list that you may use. The registrar is located at http://www.jabber.org/registrar/
Current Implementation: JEP-0030 Version 2.0
ServiceInfoIQMessageTYPE_GET, TYPE_RESULT, TYPE_SETTYPE_ERRORmessageID| Constructor and Description |
|---|
ServiceItemsIQMessage() |
ServiceItemsIQMessage(java.lang.String type)
defaults to iq type get for retrieval or for parsing incoming messages
|
| Modifier and Type | Method and Description |
|---|---|
void |
addItem(ServiceItem serviceItem)
Adds a new service item to the message
|
java.lang.String |
encode()
The default encoding will serialize the DOM Tree.
|
java.util.List |
getItems() |
int |
getMessageType()
the default message type is unknown.
|
java.lang.String |
getNode() |
JabberMessage |
parse(JabberMessageParser parser,
Element msgTree)
parses the message.
|
void |
setNode(java.lang.String node)
sets the node name so that further subnode items can be retrieved.
|
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 ServiceItemsIQMessage(java.lang.String type)
public ServiceItemsIQMessage()
public int getMessageType()
JabberJDOMMessagegetMessageType in class JabberIQMessageJabberCodepublic void addItem(ServiceItem serviceItem)
serviceItem - a service itempublic java.util.List getItems()
public void setNode(java.lang.String node)
node - the node name to query furtherpublic java.lang.String getNode()
public JabberMessage parse(JabberMessageParser parser, Element msgTree) throws ParseException
AbstractJabberMessageparse in interface JabberMessageParsableparse in class AbstractJabberMessageParseExceptionpublic java.lang.String encode()
throws ParseException
JabberJDOMMessageencode in class JabberJDOMMessageParseException - if something went wrong during encodingCopyright © 2001-2005 Echomine. All Rights Reserved.