Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## org.xmpp.packet
Enum Roster.Subscription

    java.lang.Object
      java.lang.Enum<Roster.Subscription>
          org.xmpp.packet.Roster.Subscription

All Implemented Interfaces:
  Serializable, Comparable<Roster.Subscription>

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.

Enum Constant Summary
`both` Both the user and the contact have subscriptions to each other's presence information.
`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.
`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.
`remove` The user is removing a contact from his or her roster.
`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.

Method Summary
`static Roster.Subscription` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static Roster.Subscription[]` | `values()` Returns an array containing the constants of this enum type, in the order they're declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### 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 Detail

### values

    public static final Roster.Subscription[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(Roster.Subscription c : Roster.Subscription.values())
              System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they're 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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

Copyright © 2003-2007 Jive Software.