Package rocks.xmpp.im.roster.model
Enum SubscriptionState.Subscription
- java.lang.Object
-
- java.lang.Enum<SubscriptionState.Subscription>
-
- rocks.xmpp.im.roster.model.SubscriptionState.Subscription
-
- All Implemented Interfaces:
Serializable
,Comparable<SubscriptionState.Subscription>
- Enclosing interface:
- SubscriptionState
public static enum SubscriptionState.Subscription extends Enum<SubscriptionState.Subscription>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOTH
The user and the contact have subscriptions to each other's presence (also called a "mutual subscription").FROM
The contact has a subscription to the user's presence, but the user does not have a subscription to the contact's presence.NONE
The user does not have a subscription to the contact's presence, and the contact does not have a subscription to the user's presence; this is the default value, so if the subscription attribute is not included then the state is to be understood as "none".REMOVE
At any time, a client can delete an item from his or her roster by sending a roster set and specifying a value of "remove" for the 'subscription' attribute.TO
The user has a subscription to the contact's presence, but the contact does not have a subscription to the user's presence.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contactHasSubscriptionToUser()
boolean
userHasSubscriptionToContact()
static SubscriptionState.Subscription
valueOf(String name)
Returns the enum constant of this type with the specified name.static SubscriptionState.Subscription[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOTH
public static final SubscriptionState.Subscription BOTH
The user and the contact have subscriptions to each other's presence (also called a "mutual subscription").
-
FROM
public static final SubscriptionState.Subscription FROM
The contact has a subscription to the user's presence, but the user does not have a subscription to the contact's presence.
-
TO
public static final SubscriptionState.Subscription TO
The user has a subscription to the contact's presence, but the contact does not have a subscription to the user's presence.
-
NONE
public static final SubscriptionState.Subscription NONE
The user does not have a subscription to the contact's presence, and the contact does not have a subscription to the user's presence; this is the default value, so if the subscription attribute is not included then the state is to be understood as "none".
-
REMOVE
public static final SubscriptionState.Subscription REMOVE
At any time, a client can delete an item from his or her roster by sending a roster set and specifying a value of "remove" for the 'subscription' attribute.
-
-
Method Detail
-
values
public static SubscriptionState.Subscription[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SubscriptionState.Subscription c : SubscriptionState.Subscription.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SubscriptionState.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 nameNullPointerException
- if the argument is null
-
userHasSubscriptionToContact
public final boolean userHasSubscriptionToContact()
-
-