Enum AMPExtension.Action
- java.lang.Object
-
- java.lang.Enum<AMPExtension.Action>
-
- org.jivesoftware.smackx.amp.packet.AMPExtension.Action
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AMPExtension.Action>
- Enclosing class:
- AMPExtension
public static enum AMPExtension.Action extends java.lang.Enum<AMPExtension.Action>
amp action attribute. See http://xmpp.org/extensions/xep-0079.html#actions-def
-
-
Enum Constant Summary
Enum Constants Enum Constant Description alert
The "alert" action triggers a reply <message/> stanza to the sending entity.drop
The "drop" action silently discards the message from any further delivery attempts and ensures that it is not placed into offline storage.error
The "error" action triggers a reply <message/> stanza of type "error" to the sending entity.notify
The "notify" action triggers a reply <message/> stanza to the sending entity.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTRIBUTE_NAME
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AMPExtension.Action
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AMPExtension.Action[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
alert
public static final AMPExtension.Action alert
The "alert" action triggers a reply <message/> stanza to the sending entity. This <message/> stanza MUST contain the element <amp status='alert'/>, which itself contains the <rule/> that triggered this action. In all other respects, this action behaves as "drop".
-
drop
public static final AMPExtension.Action drop
The "drop" action silently discards the message from any further delivery attempts and ensures that it is not placed into offline storage. The drop MUST NOT result in other responses.
-
error
public static final AMPExtension.Action error
The "error" action triggers a reply <message/> stanza of type "error" to the sending entity. The <message/> stanza's <error/> child MUST contain a <failed-rules xmlns='http://jabber.org/protocol/amp#errors'/> error condition, which itself contains the rules that triggered this action.
-
notify
public static final AMPExtension.Action notify
The "notify" action triggers a reply <message/> stanza to the sending entity. This <message/> stanza MUST contain the element <amp status='notify'/>, which itself contains the <rule/> that triggered this action. Unlike the other actions, this action does not override the default behavior for a server. Instead, the server then executes its default behavior after sending the notify.
-
-
Field Detail
-
ATTRIBUTE_NAME
public static final java.lang.String ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static AMPExtension.Action[] 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 (AMPExtension.Action c : AMPExtension.Action.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AMPExtension.Action 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 namejava.lang.NullPointerException
- if the argument is null
-
-