public class UserSearchManager extends java.lang.Object
XMPPConnection con = new XMPPTCPConnection("jabber.org");
con.login("john", "doe");
UserSearchManager search = new UserSearchManager(con, "users.jabber.org");
Form searchForm = search.getSearchForm();
Form answerForm = searchForm.createAnswerForm();
answerForm.setAnswer("last", "DeMoro");
ReportedData data = search.getSearchResults(answerForm);
// Use Returned Data
| Constructor and Description |
|---|
UserSearchManager(XMPPConnection con)
Creates a new UserSearchManager.
|
| Modifier and Type | Method and Description |
|---|---|
Form |
getSearchForm(org.jxmpp.jid.DomainBareJid searchService)
Returns the form to fill out to perform a search.
|
ReportedData |
getSearchResults(Form searchForm,
org.jxmpp.jid.DomainBareJid searchService)
Submits a search form to the server and returns the resulting information
in the form of
ReportedData. |
java.util.List<org.jxmpp.jid.DomainBareJid> |
getSearchServices()
Returns a collection of search services found on the server.
|
public UserSearchManager(XMPPConnection con)
con - the XMPPConnection to use.public Form getSearchForm(org.jxmpp.jid.DomainBareJid searchService) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
searchService - the search service to query.XMPPException.XMPPErrorExceptionSmackException.NoResponseExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic ReportedData getSearchResults(Form searchForm, org.jxmpp.jid.DomainBareJid searchService) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
ReportedData.searchForm - the Form to submit for searching.searchService - the name of the search service to use.XMPPException.XMPPErrorExceptionSmackException.NoResponseExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedExceptionpublic java.util.List<org.jxmpp.jid.DomainBareJid> getSearchServices() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
XMPPException.XMPPErrorExceptionSmackException.NoResponseExceptionSmackException.NotConnectedExceptionjava.lang.InterruptedException