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

## de.knipp.rritoolkit
Class DefaultResponseFactory.ClassRule

    java.lang.Object
      de.knipp.rritoolkit.DefaultResponseFactory.ListRule
          de.knipp.rritoolkit.DefaultResponseFactory.ClassRule

All Implemented Interfaces:
  java.lang.Comparable<DefaultResponseFactory.ListRule>

Enclosing class:
  DefaultResponseFactory

    protected class DefaultResponseFactory.ClassRule

extends DefaultResponseFactory.ListRule

rule that uses the request for the selection of the suitable response

Version:
  $Revision: 14936 $
Author:
  Klaus Malorny

Field Summary
`private java.lang.Class<? extends Request>` | `matchClass` the class that the request must match
`private boolean` | `withSubclasses` flag whether subclasses of the classes also match

Constructor Summary
`DefaultResponseFactory.ClassRule(int thePriority, java.lang.Class<? extends Response> theClass, java.lang.Class<? extends Request> theMatchClass, boolean withSub)` constructor

Method Summary
`boolean` | `matches(org.w3c.dom.Document doc, Request request)` test whether the rule matches
`boolean` | `matches(KVMultiList list, Request request)` test whether the rule matches
`private boolean` | `matches(Request request)` test whether the rule matches

Methods inherited from class de.knipp.rritoolkit.DefaultResponseFactory.ListRule
`compareTo, getResponseClass`

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

Field Detail

### matchClass

    private java.lang.Class<? extends Request> matchClass

  the class that the request must match

### withSubclasses

    private boolean withSubclasses

  flag whether subclasses of the classes also match

Constructor Detail

### DefaultResponseFactory.ClassRule

    public DefaultResponseFactory.ClassRule(int thePriority,
                                            java.lang.Class<? extends Response> theClass,
                                            java.lang.Class<? extends Request> theMatchClass,
                                            boolean withSub)

  constructor

  Parameters:
    `thePriority` - the priority. The smaller the number, the earlier the rule is used.
    `theClass` - the class that shall be instantiated
    `theMatchClass` - the class that the request must match
    `withSub` - whether subclasses also match

Method Detail

### matches

    private boolean matches(Request request)

  test whether the rule matches

  Parameters:
    `request` - the request, may be `null`
  Returns:
    `true` if the rule matches

### matches

    public boolean matches(KVMultiList list,
                           Request request)

  test whether the rule matches

  Specified by:
    `matches` in class `DefaultResponseFactory.ListRule`
  Parameters:
    `list` - the list
    `request` - the request, may be `null`
  Returns:
    `true` if the rule matches

### matches

    public boolean matches(org.w3c.dom.Document doc,
                           Request request)

  test whether the rule matches

  Specified by:
    `matches` in class `DefaultResponseFactory.ListRule`
  Parameters:
    `doc` - the document
    `request` - the request, may be `null`
  Returns:
    `true` if the rule matches

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 © 2005-2011 Knipp Medien und Kommunikation GmbH