# SubscriptionType
Date: 2012-02-24

## com.google.appengine.api.xmpp
Enum SubscriptionType

    java.lang.Object
      java.lang.Enum<SubscriptionType>
          com.google.appengine.api.xmpp.SubscriptionType

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<SubscriptionType>

    public enum SubscriptionType

extends java.lang.Enum<SubscriptionType>

Values for the 'type' attributes used for presence subscription. These are only types from stanzas dealing with subscriptions. Types used for presence information are enumerated in `PresenceType` even though they are both communicated via presence stanzas.

See Also:
  RFC 3921, Section 6 for the specification of XMPP Presence Subscription.

Enum Constant Summary
`SUBSCRIBE` Signals that a contact has requested a subscription.
`SUBSCRIBED` Signals that a contact has accepted a request for subscription.
`UNSUBSCRIBE` Signals that a contact is requesting an end to a subscription.
`UNSUBSCRIBED` Signals that a contact has ended a subscription.

Method Summary
`static SubscriptionType` `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static SubscriptionType[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

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

Enum Constant Detail

### SUBSCRIBE

    public static final SubscriptionType SUBSCRIBE

  Signals that a contact has requested a subscription.

### SUBSCRIBED

    public static final SubscriptionType SUBSCRIBED

  Signals that a contact has accepted a request for subscription.

### UNSUBSCRIBE

    public static final SubscriptionType UNSUBSCRIBE

  Signals that a contact is requesting an end to a subscription.

### UNSUBSCRIBED

    public static final SubscriptionType UNSUBSCRIBED

  Signals that a contact has ended a subscription.

Method Detail

### values

    public static SubscriptionType[] 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 (SubscriptionType c : SubscriptionType.values())
          System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they are declared

### valueOf

    public static SubscriptionType valueOf(java.lang.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:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
    `java.lang.NullPointerException` - if the argument is null