|
||||||||||
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.SearchIQMessage
public class SearchIQMessage
This message works with the jabber:iq:search namespace. The jabber:iq:search namespace is used to search for users in a directory. Such a directory is usually called a Jabber User Directory or JUD; the largest such directory on the Jabber network is that hosted at users.jabber.org on the jabber.org public Jabber server. Users may add, update, or delete their information to this directory using the jabber:iq:register namespace; they may also search for other users in the directory using the jabber:iq:search namespace. The specific fields available for searching are determined by the implementation; however, the possible search fields are limited to those documented herein (i.e., the namespace is not extensible). The basic functionality is for a user to query a directory regarding the possible search fields, to send a search query, and to receive search results. There is currently no mechanism for paging through results or limiting the number of "hits". TODO: addFields, addField, getFields are similar to RegisterIQMessage. Should refactor when get a chance.
Current Implementation: JEP-0055 Version 1.0
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 | |
---|---|
SearchIQMessage()
sets the default to be of iq type "get" |
|
SearchIQMessage(java.lang.String type)
this constructor is for creating outgoing messages. |
Method Summary | |
---|---|
void |
addField(java.lang.String name,
java.lang.String value)
normally used to add fields that should be sent to the server when registering a new account or updating a current one. |
void |
addFields(java.util.HashMap fields)
this method allows you to add multiple fields at once. |
java.util.HashMap |
getFields()
this is used normally for incoming messages to retrieve the fields that are returned. |
int |
getMessageType()
the default message type is unknown. |
java.util.List |
getResultItems()
retrieves the list of search result items if there are any. |
Methods inherited from class com.echomine.jabber.AbstractJabberMessage |
---|
getErrorMessage, getFrom, getTo, getType, isError, parse, setErrorMessage, setFrom, setTo, setType |
Methods inherited from class com.echomine.jabber.JabberJDOMMessage |
---|
encode, 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 SearchIQMessage(java.lang.String type)
public SearchIQMessage()
Method Detail |
---|
public void addField(java.lang.String name, java.lang.String value)
name
- the name of the fieldvalue
- the value that is associated with the namepublic void addFields(java.util.HashMap fields)
public java.util.HashMap getFields()
public java.util.List getResultItems()
java.lang.IllegalStateException
- if the message type is not a result typepublic int getMessageType()
JabberJDOMMessage
getMessageType
in class JabberIQMessage
JabberCode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |