public static enum Message.Type extends java.lang.Enum<Message.Type>
Represents a <message/>
‘type’ attribute.
Common uses of the message stanza in instant messaging applications include: single messages; messages sent in the context of a one-to-one chat session; messages sent in the context of a multi-user chat room; alerts, notifications, or other information to which no reply is expected; and errors. These uses are differentiated via the ‘type’ attribute.
Enum Constant and Description |
---|
CHAT
The message is sent in the context of a one-to-one chat session.
|
ERROR
The message is generated by an entity that experiences an error when processing a message received from another entity.
|
GROUPCHAT
The message is sent in the context of a multi-user chat environment (similar to that of [IRC]).
|
HEADLINE
The message provides an alert, a notification, or other transient information to which no reply is expected (e.g., news headlines, sports updates, near-real-time market data, or syndicated content).
|
NORMAL
The message is a standalone message that is sent outside the context of a one-to-one conversation or groupchat, and to which it is expected that the recipient will reply.
|
Modifier and Type | Method and Description |
---|---|
static Message.Type |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Message.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Message.Type NORMAL
public static final Message.Type CHAT
public static final Message.Type HEADLINE
public static final Message.Type GROUPCHAT
public static final Message.Type ERROR
public static Message.Type[] values()
for (Message.Type c : Message.Type.values()) System.out.println(c);
public static Message.Type valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullCopyright © 2014–2019 XMPP.rocks. All rights reserved.