Class SubscribeOptions.Builder
- java.lang.Object
-
- rocks.xmpp.extensions.data.model.DataForm.Builder<SubscribeOptions.Builder>
-
- rocks.xmpp.extensions.pubsub.model.SubscribeOptions.Builder
-
- Enclosing class:
- SubscribeOptions
public static final class SubscribeOptions.Builder extends DataForm.Builder<SubscribeOptions.Builder>
A builder for the subscribe options.- See Also:
SubscribeOptions
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubscribeOptions
build()
Builds the subscribe options.SubscribeOptions.Builder
deliver(boolean deliver)
Sets whether an entity wants to receive or disable notifications.SubscribeOptions.Builder
digest(boolean digest)
Sets whether you want to receive digests (aggregations) of notifications or all notifications individually.SubscribeOptions.Builder
digestFrequency(Integer digestFrequency)
Sets the minimum number of milliseconds between sending any two notification digestsSubscribeOptions.Builder
expireAt(Instant expireAt)
Sets the expiration date.SubscribeOptions.Builder
includeBody(boolean includeBody)
Sets whether you want to receive an XMPP message body in addition to the payload.SubscribeOptions.Builder
showValues(Collection<Presence.Show> showValues)
Sets the presence states for which an entity wants to receive notifications.SubscribeOptions.Builder
subscriptionDepth(Integer subscriptionDepth)
Sets the subscription depth.SubscribeOptions.Builder
subscriptionType(SubscribeOptions.SubscriptionType subscriptionType)
Sets the subscription type.SubscribeOptions.Builder
temporary(boolean temporary)
If the subscription is temporary, i.e. only as long as you are online.-
Methods inherited from class rocks.xmpp.extensions.data.model.DataForm.Builder
fields, formType, instructions, items, pages, reportedFields, title, type
-
-
-
-
Method Detail
-
deliver
public final SubscribeOptions.Builder deliver(boolean deliver)
Sets whether an entity wants to receive or disable notifications.- Parameters:
deliver
- Whether an entity wants to receive or disable notifications.- Returns:
- The builder.
-
digest
public final SubscribeOptions.Builder digest(boolean digest)
Sets whether you want to receive digests (aggregations) of notifications or all notifications individually.- Parameters:
digest
- Whether you want to receive digests (aggregations) of notifications or all notifications individually.- Returns:
- The builder.
-
digestFrequency
public final SubscribeOptions.Builder digestFrequency(Integer digestFrequency)
Sets the minimum number of milliseconds between sending any two notification digests- Parameters:
digestFrequency
- The minimum number of milliseconds between sending any two notification digests.- Returns:
- The builder.
-
includeBody
public final SubscribeOptions.Builder includeBody(boolean includeBody)
Sets whether you want to receive an XMPP message body in addition to the payload.- Parameters:
includeBody
- Whether you want to receive an XMPP message body in addition to the payload.- Returns:
- The builder.
- See Also:
- 12.7 Including a Message Body
-
showValues
public final SubscribeOptions.Builder showValues(Collection<Presence.Show> showValues)
Sets the presence states for which an entity wants to receive notifications. A null value corresponds to "available" presence.- Parameters:
showValues
- The presence states for which an entity wants to receive notifications.- Returns:
- The builder.
-
expireAt
public final SubscribeOptions.Builder expireAt(Instant expireAt)
Sets the expiration date.- Parameters:
expireAt
- The expiration date.- Returns:
- The builder.
- See Also:
- 12.18 Time-Based Subscriptions (Leases)
-
temporary
public final SubscribeOptions.Builder temporary(boolean temporary)
If the subscription is temporary, i.e. only as long as you are online.- Parameters:
temporary
- If the subscription is temporary, i.e. only as long as you are online.- Returns:
- The builder.
- See Also:
- 12.4 Temporary Subscriptions
-
subscriptionType
public final SubscribeOptions.Builder subscriptionType(SubscribeOptions.SubscriptionType subscriptionType)
Sets the subscription type.- Parameters:
subscriptionType
- The subscription type.- Returns:
- The builder.
- See Also:
- 9.1 Auto-Subscribe
-
subscriptionDepth
public final SubscribeOptions.Builder subscriptionDepth(Integer subscriptionDepth)
Sets the subscription depth. If the depth is negative, the depth is interpreted as "all".- Parameters:
subscriptionDepth
- The subscription depth.- Returns:
- The builder.
- See Also:
- 9.1 Auto-Subscribe
-
build
public final SubscribeOptions build()
Builds the subscribe options.- Returns:
- The subscribe options.
-
-