public final class Rule extends Object
<rule/> element, used both in the http://jabber.org/protocol/amp namespace as well as in the http://jabber.org/protocol/amp#errors namespace.
This class is immutable.
| Modifier and Type | Class and Description |
|---|---|
static class |
Rule.Action
The action defines what occurs when a particular rule is triggered.
|
static class |
Rule.Condition
The condition defines how or when a particular rule is triggered.
|
static class |
Rule.DeliveryMode
The possible values for the
Rule.Condition.DELIVER condition. |
static class |
Rule.MatchResource
The possible values for the
Rule.Condition.MATCH_RESOURCE condition. |
| Modifier and Type | Method and Description |
|---|---|
static Rule |
deliver(Rule.Action action,
Rule.DeliveryMode value)
Creates the defined "deliver" rule.
|
static Rule |
expireAt(Rule.Action action,
Instant instant)
Creates the defined "expire-at" rule.
|
Rule.Action |
getAction()
The 'action' attribute defines the result for this rule.
|
Rule.Condition |
getCondition()
The 'condition' attribute defines the overall condition this rule applies to.
|
String |
getValue()
The 'value' attribute defines how the condition is matched.
|
static Rule |
matchResource(Rule.Action action,
Rule.MatchResource value)
Creates the defined "match-resource" rule.
|
static Rule |
of(Rule.Action action,
Rule.Condition condition,
String value)
Creates a rule.
|
public static Rule of(Rule.Action action, Rule.Condition condition, String value)
action - The action.condition - The condition.value - The value. This depends on the condition.public static Rule expireAt(Rule.Action action, Instant instant)
action - The action.instant - The expiration date.public static Rule deliver(Rule.Action action, Rule.DeliveryMode value)
action - The action.value - The value.public static Rule matchResource(Rule.Action action, Rule.MatchResource value)
action - The action.value - The value.public final Rule.Action getAction()
public final Rule.Condition getCondition()
public final String getValue()
Copyright © 2014–2016 XMPP.rocks. All rights reserved.