Package rocks.xmpp.extensions.amp.model
Class AdvancedMessageProcessing
- java.lang.Object
-
- rocks.xmpp.core.stream.model.StreamFeature
-
- rocks.xmpp.extensions.amp.model.AdvancedMessageProcessing
-
- All Implemented Interfaces:
Comparable<StreamFeature>
public final class AdvancedMessageProcessing extends StreamFeature
The implementation of the<amp/>
element in thehttp://jabber.org/protocol/amp
namespace.This class is immutable.
- See Also:
- XEP-0079: Advanced Message Processing, XML Schema
-
-
Constructor Summary
Constructors Constructor Description AdvancedMessageProcessing(Collection<Rule> rules)
Constructs an<amp/>
element with rules.AdvancedMessageProcessing(Collection<Rule> rules, Boolean perHop)
Constructs an<amp/>
element with rules and a per-hop attribute.AdvancedMessageProcessing(List<Rule> rules, Rule.Action status, Jid from, Jid to)
Constructs an<amp/>
element with rules, status, from and to attribute.AdvancedMessageProcessing(Rule... rules)
Constructs an<amp/>
element with rules.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Jid
getFrom()
The 'from' attribute specifies the original sender of the containing<message/>
stanza.List<Rule>
getRules()
Gets the rules.Rule.Action
getStatus()
The 'status' attribute specifies the reason for this<amp/>
element.Jid
getTo()
The 'to' attribute specifies the original (intended) recipient of the containing<message/>
stanza.boolean
isPerHop()
The 'per-hop' attribute flags the contained ruleset for processing at each server in the route between the original sender and original intended recipient.-
Methods inherited from class rocks.xmpp.core.stream.model.StreamFeature
compareTo, getPriority, isMandatory, requiresRestart
-
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
http://jabber.org/protocol/amp- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AdvancedMessageProcessing
public AdvancedMessageProcessing(Rule... rules)
Constructs an<amp/>
element with rules.- Parameters:
rules
- The rules.
-
AdvancedMessageProcessing
public AdvancedMessageProcessing(Collection<Rule> rules)
Constructs an<amp/>
element with rules.- Parameters:
rules
- The rules.
-
AdvancedMessageProcessing
public AdvancedMessageProcessing(Collection<Rule> rules, Boolean perHop)
Constructs an<amp/>
element with rules and a per-hop attribute.- Parameters:
rules
- The rules.perHop
- The per-hop attribute.
-
AdvancedMessageProcessing
public AdvancedMessageProcessing(List<Rule> rules, Rule.Action status, Jid from, Jid to)
Constructs an<amp/>
element with rules, status, from and to attribute.- Parameters:
rules
- The rules.status
- The status.from
- The from attribute.to
- The to attribute.
-
-
Method Detail
-
isPerHop
public final boolean isPerHop()
The 'per-hop' attribute flags the contained ruleset for processing at each server in the route between the original sender and original intended recipient.- Returns:
- The per-hop attribute.
-
getStatus
public final Rule.Action getStatus()
The 'status' attribute specifies the reason for this<amp/>
element. When specifying semantics to be applied (client to server), this attribute MUST NOT be present. When replying to a sending entity regarding a met condition, this attribute MUST be present and SHOULD be the value of the 'action' attribute for the triggered rule. (Note: Individual action definitions MAY provide their own requirements.)- Returns:
- The status.
-
getFrom
public final Jid getFrom()
The 'from' attribute specifies the original sender of the containing<message/>
stanza. This attribute MUST be specified for any<message/>
stanza sent from a supporting server, regardless of the recipient. It SHOULD NOT be specified otherwise. The value of the 'from' attribute MUST be the full JID (node@domain/resource) of the sender for the original<message/>
stanza.- Returns:
- The from attribute.
-
getTo
public final Jid getTo()
The 'to' attribute specifies the original (intended) recipient of the containing<message/>
stanza. This attribute MUST be specified for any<message/>
stanza sent from a supporting server, regardless of the recipient. It SHOULD NOT be specified otherwise. The value of the 'to' attribute MUST be the full JID (node@domain/resource) of the intended recipient for the original<message/>
stanza.- Returns:
- The to attribute.
-
-