|
||||||||||
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.ServiceItemsIQMessage
public class ServiceItemsIQMessage
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
ServiceInfoIQMessage
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 | |
---|---|
ServiceItemsIQMessage()
|
|
ServiceItemsIQMessage(java.lang.String type)
defaults to iq type get for retrieval or for parsing incoming messages |
Method Summary | |
---|---|
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. |
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 ServiceItemsIQMessage(java.lang.String type)
public ServiceItemsIQMessage()
Method Detail |
---|
public int getMessageType()
JabberJDOMMessage
getMessageType
in class JabberIQMessage
JabberCode
public 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
AbstractJabberMessage
parse
in interface JabberMessageParsable
parse
in class AbstractJabberMessage
ParseException
public java.lang.String encode() throws ParseException
JabberJDOMMessage
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 |