public final class SearchManager extends Manager
The search manager allows to perform search requests on a server or service component according to XEP-0055: Jabber Search.
The basic functionality is to query an information repository regarding the possible search fields, to send a search query, and to receive search results. Note well that there is currently no mechanism for paging through results or limiting the number of “hits”, and that the allowable search fields are limited to those defined in the XML schema; however, extensibility MAY be provided via the Data Forms (XEP-0004) protocol.
Modifier and Type | Method and Description |
---|---|
AsyncResult<Search> |
discoverSearchFields(Jid service)
Discovers the supported search fields of a service.
|
AsyncResult<Search> |
search(Search search,
Jid service)
Performs a search on the given service with given search parameters.
|
isEnabled, setEnabled
public AsyncResult<Search> discoverSearchFields(Jid service)
Discovers the supported search fields of a service.
In order to search an information respository, a user first needs to discover what search fields are supported by the service.
The service MUST then return the possible search fields to the user, and MAY include instructions.
service
- The service address.public AsyncResult<Search> search(Search search, Jid service)
Performs a search on the given service with given search parameters. Note that this method blocks the current thread until a response has received.
search
- The search parameters.service
- The service, which will perform the search, usually a server or server component.Search.getItems()
) or null if search is not supported.Copyright © 2014–2019 XMPP.rocks. All rights reserved.