public static enum Presence.Type extends Enum<Presence.Type>
available
, even if the mode is away
,
dnd
, etc. The presence type is only unavailable
when
the user is signing out of the server.Enum Constant and Description |
---|
available
The user is available to receive messages (default).
|
error
The presence stanza contains an error message.
|
probe
A presence probe as defined in section 4.3 of RFC 6121.
|
subscribe
Request subscription to recipient's presence.
|
subscribed
Grant subscription to sender's presence.
|
unavailable
The user is unavailable to receive messages.
|
unsubscribe
Request removal of subscription to sender's presence.
|
unsubscribed
Grant removal of subscription to sender's presence.
|
Modifier and Type | Method and Description |
---|---|
static Presence.Type |
fromString(String string)
Converts a String into the corresponding types.
|
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 available
public static final Presence.Type unavailable
public static final Presence.Type subscribe
public static final Presence.Type subscribed
public static final Presence.Type unsubscribe
public static final Presence.Type unsubscribed
public static final Presence.Type error
public static final Presence.Type probe
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 nullpublic static Presence.Type fromString(String string)
string
- the String value to covert.IllegalArgumentException
- when not able to parse the string parameterNullPointerException
- if the string is null