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
|
Date |
getExpire()
The DateTime at which a leased subscription
will end or has ended.
|
List<AbstractPresence.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 DataForm getDataForm()
public Boolean isDeliver()
public Boolean isDigest()
public Integer getDigestFrequency()
public Date getExpire()
public Boolean isIncludeBody()
public List<AbstractPresence.Show> getShowValues()
public SubscribeOptions.SubscriptionType getSubscriptionType()
public Integer getSubscriptionDepth()
public boolean isTemporary()
Copyright © 2014–2015 XMPP.rocks. All rights reserved.