protected class DefaultResponseFactory.ClassRule extends DefaultResponseFactory.ListRule
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ClassRule(int thePriority,
java.lang.Class<? extends Response> theClass,
java.lang.Class<? extends Request> theMatchClass,
boolean withSub)
constructor
|
Modifier and Type | Method and Description |
---|---|
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
|
compareTo, getResponseClass
private java.lang.Class<? extends Request> matchClass
private boolean withSubclasses
public ClassRule(int thePriority, java.lang.Class<? extends Response> theClass, java.lang.Class<? extends Request> theMatchClass, boolean withSub)
thePriority
- the priority. The smaller the number, the
earlier the rule is used.theClass
- the class that shall be instantiatedtheMatchClass
- the class that the request must matchwithSub
- whether subclasses also matchprivate boolean matches(Request request)
request
- the request, may be null
true
if the rule matchespublic boolean matches(KVMultiList list, Request request)
matches
in class DefaultResponseFactory.ListRule
list
- the listrequest
- the request, may be null
true
if the rule matchespublic boolean matches(org.w3c.dom.Document doc, Request request)
matches
in class DefaultResponseFactory.ListRule
doc
- the documentrequest
- the request, may be null
true
if the rule matchesCopyright © 2005-2013 Knipp Medien und Kommunikation GmbH