Enum Roster.Subscription

java.lang.Object
java.lang.Enum<Roster.Subscription>
org.xmpp.packet.Roster.Subscription
All Implemented Interfaces:
Serializable, Comparable<Roster.Subscription>, java.lang.constant.Constable
Enclosing class:
Roster

public static enum Roster.Subscription extends Enum<Roster.Subscription>
Type-safe enumeration for the roster subscription type. Valid subcription types:
  • Roster.Subscription.none -- the user does not have a subscription to the contact's presence information, and the contact does not have a subscription to the user's presence information.
  • Roster.Subscription.to -- the user has a subscription to the contact's presence information, but the contact does not have a subscription to the user's presence information.
  • Roster.Subscription.from -- the contact has a subscription to the user's presence information, but the user does not have a subscription to the contact's presence information.
  • Roster.Subscription.both -- both the user and the contact have subscriptions to each other's presence information.
  • Roster.Subscription.remove -- the user is removing a contact from his or her roster.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Both the user and the contact have subscriptions to each other's presence information.
    The contact has a subscription to the user's presence information, but the user does not have a subscription to the contact's presence information.
    The user does not have a subscription to the contact's presence information, and the contact does not have a subscription to the user's presence information.
    The user is removing a contact from his or her roster.
    The user has a subscription to the contact's presence information, but the contact does not have a subscription to the user's presence information.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • none

      public static final Roster.Subscription none
      The user does not have a subscription to the contact's presence information, and the contact does not have a subscription to the user's presence information.
    • to

      public static final Roster.Subscription to
      The user has a subscription to the contact's presence information, but the contact does not have a subscription to the user's presence information.
    • from

      public static final Roster.Subscription from
      The contact has a subscription to the user's presence information, but the user does not have a subscription to the contact's presence information.
    • both

      public static final Roster.Subscription both
      Both the user and the contact have subscriptions to each other's presence information.
    • remove

      public static final Roster.Subscription remove
      The user is removing a contact from his or her roster. The user's server will 1) automatically cancel any existing presence subscription between the user and the contact, 2) remove the roster item from the user's roster and inform all of the user's available resources that have requested the roster of the roster item removal, 3) inform the resource that initiated the removal of success and 4) send unavailable presence from all of the user's available resources to the contact.
  • Method Details

    • values

      public static Roster.Subscription[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Roster.Subscription valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null