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

## org.xmpp.packet
Enum Presence.Type

    java.lang.Object
      java.lang.Enum<Presence.Type>
          org.xmpp.packet.Presence.Type

All Implemented Interfaces:
  Serializable, Comparable<Presence.Type>

Enclosing class:
  Presence

    public static enum Presence.Type

extends Enum<Presence.Type>

Represents the type of a presence packet. Note: the presence is assumed to be "available" when the type attribute of the packet is `null`. The valid types are:

- `Presence.Type.unavailable` -- signals that the entity is no longer available for communication.
- `Presence.Type.subscribe` -- the sender wishes to subscribe to the recipient's presence.
- `Presence.Type.subscribed` -- the sender has allowed the recipient to receive their presence.
- `Presence.Type.unsubscribe` -- the sender is unsubscribing from another entity's presence.
- `Presence.Type.unsubcribed` -- the subscription request has been denied or a previously-granted subscription has been cancelled.
- `Presence.Type.probe` -- a request for an entity's current presence; SHOULD be generated only by a server on behalf of a user.
- `Presence.Type.error` -- an error has occurred regarding processing or delivery of a previously-sent presence stanza.

Enum Constant Summary
`error` An error has occurred regarding processing or delivery of a previously-sent presence stanza.
`probe` A request for an entity's current presence; SHOULD be generated only by a server on behalf of a user.
`subscribe` The sender wishes to subscribe to the recipient's presence.
`subscribed` The sender has allowed the recipient to receive their presence.
`unavailable` Typically short text message used in line-by-line chat interfaces.
`unsubscribe` The sender is unsubscribing from another entity's presence.
`unsubscribed` The subscription request has been denied or a previously-granted subscription has been cancelled.

Method Summary
`static Presence.Type` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static Presence.Type[]` | `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

### unavailable

    public static final Presence.Type unavailable

  Typically short text message used in line-by-line chat interfaces.

### subscribe

    public static final Presence.Type subscribe

  The sender wishes to subscribe to the recipient's presence.

### subscribed

    public static final Presence.Type subscribed

  The sender has allowed the recipient to receive their presence.

### unsubscribe

    public static final Presence.Type unsubscribe

  The sender is unsubscribing from another entity's presence.

### unsubscribed

    public static final Presence.Type unsubscribed

  The subscription request has been denied or a previously-granted subscription has been cancelled.

### probe

    public static final Presence.Type probe

  A request for an entity's current presence; SHOULD be generated only by a server on behalf of a user.

### error

    public static final Presence.Type error

  An error has occurred regarding processing or delivery of a previously-sent presence stanza.

Method Detail

### values

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

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

### valueOf

    public static Presence.Type 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.4 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

Copyright © 2003-2007 Jive Software.