public final class SubscribeOptions extends Object
DataForm with form type http://jabber.org/protocol/pubsub#subscribe_options, which can be used to configure a node subscription.
DataForm to retrieve standard data from it, use:
SubscribeOptions subscribeOptions = new SubscribeOptions(dataForm);
To build a form:
SubscribeOptions subscribeOptions = SubscribeOptions.builder()
.deliver(true)
.digest(true)
.digestFrequency(3)
.includeBody(true)
.temporary(true)
.showValues(Arrays.asList(AbstractPresence.Show.AWAY, AbstractPresence.Show.CHAT, null))
.subscriptionType(SubscribeOptions.SubscriptionType.NODES)
.subscriptionDepth(-1)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
SubscribeOptions.Builder
A builder for the subscribe options.
|
static class |
SubscribeOptions.SubscriptionType
The subscription type.
|
| Constructor and Description |
|---|
SubscribeOptions(DataForm dataForm) |
| Modifier and Type | Method and Description |
|---|---|
static SubscribeOptions.Builder |
builder()
Creates a builder to build subscribe options.
|
DataForm |
getDataForm()
Gets the underlying data form.
|
Integer |
getDigestFrequency()
The minimum number of milliseconds between
sending any two notification digests
|
Instant |
getExpire()
The DateTime at which a leased subscription
will end or has ended.
|
List<Presence.Show> |
getShowValues()
Gets the show values.
|
Integer |
getSubscriptionDepth()
Gets the subscription depth.
|
SubscribeOptions.SubscriptionType |
getSubscriptionType()
Gets the subscription type.
|
Boolean |
isDeliver()
Whether an entity wants to receive or disable notifications.
|
Boolean |
isDigest()
Whether an entity wants to receive digests
(aggregations) of notifications or all
notifications individually.
|
Boolean |
isIncludeBody()
Whether an entity wants to receive an XMPP
message body in addition to the payload
format.
|
boolean |
isTemporary()
Whether the subscription is temporary, i.e. presence-based.
|
public SubscribeOptions(DataForm dataForm)
public static SubscribeOptions.Builder builder()
public final DataForm getDataForm()
public final Boolean isDeliver()
public Boolean isDigest()
public final Integer getDigestFrequency()
public final Instant getExpire()
public final Boolean isIncludeBody()
public final List<Presence.Show> getShowValues()
public final SubscribeOptions.SubscriptionType getSubscriptionType()
public final Integer getSubscriptionDepth()
public final boolean isTemporary()
Copyright © 2014–2017 XMPP.rocks. All rights reserved.