Package org.jivesoftware.smackx.mam
Class MamManager.MamQueryArgs.Builder
- java.lang.Object
-
- org.jivesoftware.smackx.mam.MamManager.MamQueryArgs.Builder
-
- Enclosing class:
- MamManager.MamQueryArgs
public static final class MamManager.MamQueryArgs.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Constructor Detail
-
Builder
public Builder()
-
-
Method Detail
-
queryNode
public MamManager.MamQueryArgs.Builder queryNode(String node)
-
limitResultsToJid
public MamManager.MamQueryArgs.Builder limitResultsToJid(Jid withJid)
-
limitResultsSince
public MamManager.MamQueryArgs.Builder limitResultsSince(Date start)
-
limitResultsBefore
public MamManager.MamQueryArgs.Builder limitResultsBefore(Date end)
-
setResultPageSize
public MamManager.MamQueryArgs.Builder setResultPageSize(Integer max)
-
setResultPageSizeTo
public MamManager.MamQueryArgs.Builder setResultPageSizeTo(int max)
-
onlyReturnMessageCount
public MamManager.MamQueryArgs.Builder onlyReturnMessageCount()
Only return the count of messages the query yields, not the actual messages. Note that not all services return a correct count, some return an approximate count.- Returns:
- an reference to this builder.
- See Also:
- XEP-0059 § 2.7
-
withAdditionalFormField
public MamManager.MamQueryArgs.Builder withAdditionalFormField(FormField formField)
-
withAdditionalFormFields
public MamManager.MamQueryArgs.Builder withAdditionalFormFields(List<FormField> additionalFields)
-
afterUid
public MamManager.MamQueryArgs.Builder afterUid(String afterUid)
-
beforeUid
public MamManager.MamQueryArgs.Builder beforeUid(String beforeUid)
Specifies a message UID as 'before' anchor for the query. Note that unlikeafterUid(String)
this method also accepts the empty String to query the last page of an archive (c.f. XEP-0059 § 2.5).- Parameters:
beforeUid
- a message UID acting as 'before' query anchor.- Returns:
- an instance to this builder.
-
queryLastPage
public MamManager.MamQueryArgs.Builder queryLastPage()
Query from the last, i.e. most recent, page of the archive. This will return the very last page of the archive holding the most recent matching messages. You usually would page backwards from there on.- Returns:
- a reference to this builder.
- See Also:
- XEP-0059 § 2.5. Requesting the Last Page in a Result Set
-
build
public MamManager.MamQueryArgs build()
-
-