Package rocks.xmpp.core.stanza.model
Enum Presence.Type
- java.lang.Object
-
- java.lang.Enum<Presence.Type>
-
- rocks.xmpp.core.stanza.model.Presence.Type
-
- All Implemented Interfaces:
Serializable
,Comparable<Presence.Type>
- Enclosing class:
- Presence
public static enum Presence.Type extends Enum<Presence.Type>
Represents a<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 Summary
Enum Constants Enum Constant 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.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Enum Constant Detail
-
ERROR
public static final Presence.Type 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
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.
-
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.
-
UNAVAILABLE
public static final Presence.Type UNAVAILABLE
The sender is no longer available for communication.
-
UNSUBSCRIBE
public static final Presence.Type UNSUBSCRIBE
The sender is unsubscribing from the receiver's presence.
-
UNSUBSCRIBED
public static final Presence.Type UNSUBSCRIBED
The subscription request has been denied or a previously granted subscription has been canceled.
-
-
Method Detail
-
values
public static Presence.Type[] 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 (Presence.Type c : Presence.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are 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 nameNullPointerException
- if the argument is null
-
-