Openfire 3.3.2 Javadoc

org.xmpp.packet
Enum Roster.Subscription

java.lang.Object
  extended by java.lang.Enum<Roster.Subscription>
      extended by 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:


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

Openfire 3.3.2 Javadoc

Copyright © 2003-2007 Jive Software.