Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.jetty.handler.rewrite
Class Rule

    java.lang.Object
      org.mortbay.jetty.handler.rewrite.Rule

Direct Known Subclasses:
  HeaderRule, LegacyRule, MsieSslRule, PatternRule, RegexRule, RuleContainer

    public abstract class Rule

extends java.lang.Object

An abstract rule for creating rewrite rules.

Field Summary
`protected boolean` | `_handling`
`protected boolean` | `_terminating`

Constructor Summary
`Rule()`

Method Summary
`boolean` | `isHandling()` Returns the handling flag value.
`boolean` | `isTerminating()` Returns the terminating flag value.
`abstract java.lang.String` | `matchAndApply(java.lang.String target, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` This method calls tests the rule against the request/response pair and if the Rule applies, then the rule's action is triggered.
`void` | `setHandling(boolean handling)` Set the handling flag value.
`void` | `setTerminating(boolean terminating)` Sets terminating to true or false.
`java.lang.String` | `toString()` Returns the handling and terminating flag values.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### _terminating

    protected boolean _terminating

### _handling

    protected boolean _handling

Constructor Detail

### Rule

    public Rule()

Method Detail

### matchAndApply

    public abstract java.lang.String matchAndApply(java.lang.String target,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
                                            throws java.io.IOException

  This method calls tests the rule against the request/response pair and if the Rule applies, then the rule's action is triggered.

  Parameters:
    `target` - The target of the request
    `request` -
    `response` -
  Returns:
    The new target if the rule has matched, else null
  Throws:
    `java.io.IOException` - TODO

### setTerminating

    public void setTerminating(boolean terminating)

  Sets terminating to true or false. If true, this rule will terminate the loop if this rule has been applied.

  Parameters:
    `terminating` -

### isTerminating

    public boolean isTerminating()

  Returns the terminating flag value.

  Returns:
    `true` if the rule needs to terminate; `false` otherwise.

### isHandling

    public boolean isHandling()

  Returns the handling flag value.

  Returns:
    `true` if the rule handles the request and nested handlers should not be called.

### setHandling

    public void setHandling(boolean handling)

  Set the handling flag value.

  Parameters:
    `handling` - true if the rule handles the request and nested handlers should not be called.

### toString

    public java.lang.String toString()

  Returns the handling and terminating flag values.

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.