|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.commons.evaluators.Parser
public class Parser
This class is used to parse a Given HTTP request against a set of rules.
A Rule has a priority. If a HTTP request matches the Rule, parser returns the priority corresponding to that rule.
Here is the syntax of the configuration used to building the parser
<conditions [defualtPriority = "int"]>
<condition priority = "">
<and/> | <or> | <not> | <match> | <equal>
</condition>
</conditions>
| Constructor Summary | |
|---|---|
Parser()
Create a parser with the defualt priority set to -1. |
|
Parser(int defaultPriority)
Create a parser with a default priority. |
|
| Method Summary | |
|---|---|
void |
init(OMElement conditions)
Build the parser from a given XML |
int |
parse(EvaluatorContext context)
Parse the HTTP request against the condition set and return the matching priority. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Parser()
public Parser(int defaultPriority)
defaultPriority - default priority| Method Detail |
|---|
public int parse(EvaluatorContext context)
context - context used for holding the HTTP information
public void init(OMElement conditions)
throws EvaluatorException
conditions - set of conditions
EvaluatorException - if the configuration is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||