|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.net.policies.XorPolicy
public class XorPolicy
Performs a bitwise logical XOR (exclusive OR) evaluation on child policies (if both policies evaluate to true or false the XOR result is false).
This policy is useful for combining simpler policies to create complex policy decisions. The comparison is done using the bitwise XOR operation so both policies will always be evaluated.
Constructor Summary | |
---|---|
XorPolicy(AcceptPolicy firstPolicy,
AcceptPolicy secondPolicy)
Create an AND policy with the given two child policies. |
Method Summary | |
---|---|
boolean |
evaluate(Connection connection)
Enforce an XOR comparison of the two policies. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XorPolicy(AcceptPolicy firstPolicy, AcceptPolicy secondPolicy)
Create an AND policy with the given two child policies.
firstPolicy
- the first policy that will be evaluated.secondPolicy
- the first policy that will be evaluated.Method Detail |
---|
public boolean evaluate(Connection connection)
Enforce an XOR comparison of the two policies.
evaluate
in interface AcceptPolicy
connection
- the connection being evaluated by the two policies.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |