org.apache.synapse.commons.evaluators

## Class MatchEvaluator

- java.lang.Object
- - org.apache.synapse.commons.evaluators.MatchEvaluator

- All Implemented Interfaces:
    Evaluator

      public class MatchEvaluator
      extends Object
      implements Evaluator

  This evaluator uses regular expressions to match a given HTTP request.

       <match type="header | param | url" source="" regex=""/>

  The source is used to extract the HTTP header or URL param

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MatchEvaluator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `evaluate(EvaluatorContext context)` Evaluate a boolean expression
    `String` | `getName()` Name of the evaluator
    `Pattern` | `getRegex()`
    `SourceTextRetriever` | `getTextRetriever()`
    `void` | `setRegex(Pattern regex)`
    `void` | `setTextRetriever(SourceTextRetriever textRetriever)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MatchEvaluator

          public MatchEvaluator()

  - ### Method Detail

    - #### evaluate

          public boolean evaluate(EvaluatorContext context)
                           throws EvaluatorException

      Description copied from interface: `Evaluator`
      Evaluate a boolean expression
      Specified by:
        `evaluate` in interface `Evaluator`
      Parameters:
        `context` - hold the information about the HTTP request
      Returns:
        result of evaluating the boolean expression
      Throws:
        `EvaluatorException` - if an error occurs while evaluating the HTTP request

    - #### getName

          public String getName()

      Description copied from interface: `Evaluator`
      Name of the evaluator
      Specified by:
        `getName` in interface `Evaluator`
      Returns:
        name of the evaluator

    - #### getRegex

          public Pattern getRegex()

    - #### setRegex

          public void setRegex(Pattern regex)

    - #### getTextRetriever

          public SourceTextRetriever getTextRetriever()

    - #### setTextRetriever

          public void setTextRetriever(SourceTextRetriever textRetriever)

Copyright © 2005–2018 Apache Software Foundation. All rights reserved.