Class SubscribeOptions

  • All Implemented Interfaces:

    public final class SubscribeOptions
    extends Object
    implements StandardizedDataForm
    Represents a standardized DataForm with form type, which can be used to configure a node subscription.


    To wrap an existing DataForm to retrieve standard data from it, use:
     SubscribeOptions subscribeOptions = new SubscribeOptions(dataForm);
    To build a form:
     SubscribeOptions subscribeOptions = SubscribeOptions.builder()
         .showValues(Arrays.asList(AbstractPresence.Show.AWAY, AbstractPresence.Show.CHAT, null))
    See Also:
    16.4.2 pubsub#subscribe_options FORM_TYPE
    • Constructor Detail

      • SubscribeOptions

        public SubscribeOptions​(DataForm dataForm)
    • Method Detail

      • builder

        public static SubscribeOptions.Builder builder()
        Creates a builder to build subscribe options.
        The builder.
      • isDeliver

        public final Boolean isDeliver()
        Whether an entity wants to receive or disable notifications.
        True, if notifications are delivered.
      • isDigest

        public Boolean isDigest()
        Whether an entity wants to receive digests (aggregations) of notifications or all notifications individually.
        True, if digests are sent.
      • getDigestFrequency

        public final Integer getDigestFrequency()
        The minimum number of milliseconds between sending any two notification digests
        The digest frequency.
      • getExpire

        public final Instant getExpire()
        The DateTime at which a leased subscription will end or has ended.
        The expiration date.
      • isIncludeBody

        public final boolean isIncludeBody()
        Whether an entity wants to receive an XMPP message body in addition to the payload format.
        True, if the body is included.
      • getShowValues

        public final List<Presence.Show> getShowValues()
        Gets the show values.
        The show values.
      • getSubscriptionDepth

        public final Integer getSubscriptionDepth()
        Gets the subscription depth. A negative value of -1 represents "all".
        The subscription depth.
      • isTemporary

        public final boolean isTemporary()
        Whether the subscription is temporary, i.e. presence-based.
        True, if the subscription is temporary.
      • toBuilder

        public final SubscribeOptions.Builder toBuilder()
        Converts this (immutable) data form to a builder, so that a modified form can be created.
        The builder.