public static enum Presence.Type extends Enum<Presence.Type>
<presence/> 'type' attribute.
The absence of a 'type' attribute signals that the relevant entity is available for communication.
A 'type' attribute with a value of "unavailable" signals that the relevant entity is not available for communication.
The XMPP presence stanza is also used to negotiate and manage subscriptions to the presence of other entities. These tasks are completed via presence stanzas of type "subscribe", "unsubscribe", "subscribed", and "unsubscribed".
If a user and contact are associated with different XMPP servers, those servers also use a special presence stanza of type "probe" in order to determine the availability of the entity on the peer server.
| Enum Constant and Description |
|---|
ERROR
An error has occurred regarding processing of a previously sent presence stanza; if the presence stanza is of type "error", it MUST include an
<error/> child element. |
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
The sender is no longer available for communication.
|
UNSUBSCRIBE
The sender is unsubscribing from the receiver's presence.
|
UNSUBSCRIBED
The subscription request has been denied or a previously granted subscription has been canceled.
|
| Modifier and Type | Method and Description |
|---|---|
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 are declared.
|
public static final Presence.Type ERROR
<error/> child element.public static final Presence.Type PROBE
public static final Presence.Type SUBSCRIBE
public static final Presence.Type SUBSCRIBED
public static final Presence.Type UNAVAILABLE
public static final Presence.Type UNSUBSCRIBE
public static final Presence.Type UNSUBSCRIBED
public static Presence.Type[] values()
for (Presence.Type c : Presence.Type.values()) System.out.println(c);
public static Presence.Type valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2014–2015 XMPP.rocks. All rights reserved.