tigase.muc.xmpp.stanzas
Enum MessageType

java.lang.Object
  extended by java.lang.Enum<MessageType>
      extended by tigase.muc.xmpp.stanzas.MessageType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MessageType>, StanzaType

public enum MessageType
extends java.lang.Enum<MessageType>
implements StanzaType

Types of Message stanza.

Created: 2005-01-27 19:49:29

Version:
$Rev: 81 $
Author:
bmalkow

Enum Constant Summary
CHAT
          The message is sent in the context of a one-to-one chat conversation.
ERROR
          An error has occurred related to a previous message sent by the sender (for details regarding stanza error syntax, refer to [XMPP‑CORE] (Saint-Andre, P., “Extensible Messaging and Presence Protocol (XMPP): Core,” October 2004.)).
GROUPCHAT
          The message is sent in the context of a multi-user chat environment (similar to that of [IRC] (Oikarinen, J. and D.
HEADLINES
          The message is probably generated by an automated service that delivers or broadcasts content (news, sports, market information, RSS feeds, etc.).
NORMAL
          The message is a single 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.
 
Method Summary
static MessageType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MessageType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CHAT

public static final MessageType CHAT
The message is sent in the context of a one-to-one chat conversation. A compliant client SHOULD present the message in an interface enabling one-to-one chat between the two parties, including an appropriate conversation history.


ERROR

public static final MessageType ERROR
An error has occurred related to a previous message sent by the sender (for details regarding stanza error syntax, refer to [XMPP‑CORE] (Saint-Andre, P., “Extensible Messaging and Presence Protocol (XMPP): Core,” October 2004.)). A compliant client SHOULD present an appropriate interface informing the sender of the nature of the error.


GROUPCHAT

public static final MessageType GROUPCHAT
The message is sent in the context of a multi-user chat environment (similar to that of [IRC] (Oikarinen, J. and D. Reed, “Internet Relay Chat Protocol,” May 1993.)). A compliant client SHOULD present the message in an interface enabling many-to-many chat between the parties, including a roster of parties in the chatroom and an appropriate conversation history. Full definition of XMPP-based groupchat protocols is out of scope for this memo.


HEADLINES

public static final MessageType HEADLINES
The message is probably generated by an automated service that delivers or broadcasts content (news, sports, market information, RSS feeds, etc.). No reply to the message is expected, and a compliant client SHOULD present the message in an interface that appropriately differentiates the message from standalone messages, chat sessions, or groupchat sessions (e.g., by not providing the recipient with the ability to reply).


NORMAL

public static final MessageType NORMAL
The message is a single 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. A compliant client SHOULD present the message in an interface enabling the recipient to reply, but without a conversation history.

Method Detail

values

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

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

valueOf

public static MessageType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null


Copyright © 2007 Tigase. All Rights Reserved.