public final class Search extends com.bbm.sdk.bbmds.BbmdsProtocol.OutboundMessage
Search bbmcore's local data for chat messages and chat subjects. This searches for the following types of results, in priority order. When the maximum number of results have been found, searching stops.
Your application will receive a 'searchResult' in response.
When a 'search' request does not include the 'chatId' field, all chats (in all states) are examined and all result types are possible, but no more than one 'Message' type result will be returned for each matching chat. Each 'Message' result indicates the most recently received matching message in its chat.
When a 'search' request includes the 'chatId' field, only that single chat is examined and multiple 'Message' type results can be returned. Other result types will not be present. Each 'Message' result indicates one matching message in the specified chat, with more recently received messages listed first.
|Constructor and Description|
Creates a new outbound 'search' message.
|Modifier and Type||Method and Description|
Sets the optional 'chatId' attribute on the message
Sets the optional 'suggestedMaxResults' attribute on the message
public Search(java.lang.String cookie, java.lang.String text)
cookie- The cookie value that will be included in the 'searchResult' response.
text- The text of the query for case-insensitive substring search. This string must contain at least one Unicode code point or an empty result set will be returned.
public Search chatId(java.lang.String value)
value- Search a single chat for 'Message' type matches only. See this request's description for details on how this alters the search operation and results.
public Search suggestedMaxResults(long value)
value- Iff present, then no more than this many results will be returned. The result size can be limited to an internal unspecified maximum that is at least 50.