Class CookiePatternRule


public class CookiePatternRule extends PatternRule

Sets a response cookie whenever the rule matches.

See Also:
  • Constructor Details

    • CookiePatternRule

      public CookiePatternRule()
    • CookiePatternRule

      public CookiePatternRule(@Name("pattern") String pattern, @Name("name") String name, @Name("value") String value)
  • Method Details

    • getName

      public String getName()
      Get the response cookie name.
      Returns:
      the response cookie name
    • setName

      public void setName(String name)
      Set the response cookie name.
      Parameters:
      name - the response cookie name
    • getValue

      public String getValue()
      Get the response cookie value.
      Returns:
      the response cookie value
    • setValue

      public void setValue(String value)
      Set the response cookie value.
      Parameters:
      value - the response cookie value
    • apply

      public Rule.Handler apply(Rule.Handler input) throws IOException
      Description copied from class: PatternRule

      Invoked after the Servlet pattern matched the URI path to apply the rule's logic.

      Specified by:
      apply in class PatternRule
      Parameters:
      input - the input Request and Handler
      Returns:
      the possibly wrapped Request and Handler
      Throws:
      IOException - if applying the rule failed
    • toString

      public String toString()
      Overrides:
      toString in class PatternRule