Package org.jivesoftware.smack.packet
Enum Message.Type
- All Implemented Interfaces:
Serializable
,Comparable<Message.Type>
- Enclosing class:
- Message
Represents the type of a message.
-
Enum Constant Summary
Enum ConstantDescriptionTypically short text message used in line-by-line chat interfaces.indicates a messaging error.Chat message sent to a groupchat server for group chats.Text message to be displayed in scrolling marquee displays.(Default) a normal text message used in email like interface. -
Method Summary
Modifier and TypeMethodDescriptionstatic Message.Type
fromString
(String string) Converts a String into the corresponding types.static Message.Type
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.
-
Enum Constant Details
-
normal
(Default) a normal text message used in email like interface. -
chat
Typically short text message used in line-by-line chat interfaces. -
groupchat
Chat message sent to a groupchat server for group chats. -
headline
Text message to be displayed in scrolling marquee displays. -
error
indicates a messaging error.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
fromString
Converts a String into the corresponding types. Valid String values that can be converted to types are: "normal", "chat", "groupchat", "headline" and "error".- Parameters:
string
- the String value to covert.- Returns:
- the corresponding Type.
- Throws:
IllegalArgumentException
- when not able to parse the string parameterNullPointerException
- if the string is null
-