public class RangeMatch extends StatusEvaluatorImpl
StatusEvaluator
for use with BranchingHttpRequestService
.
Matches a service id against range of values (inclusive) e.g. lower=200, upper=299 to match all "success" codes.
In the adapter configuration file this class is aliased as http-status-range-match which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
RangeMatch() |
RangeMatch(int lower,
int upper,
java.lang.String serviceId) |
Modifier and Type | Method and Description |
---|---|
int |
getLower() |
int |
getUpper() |
boolean |
matches(int responseCode)
Do we match the http status
|
void |
setLower(int lowerBoundary) |
void |
setUpper(int upperBoundary) |
getServiceId, serviceId, setServiceId
public RangeMatch()
public RangeMatch(int lower, int upper, java.lang.String serviceId)
public boolean matches(int responseCode)
StatusEvaluator
responseCode
- the HTTP server response code (e.g. 500)public int getLower()
public void setLower(int lowerBoundary)
lowerBoundary
- the lowerBoundary to setpublic int getUpper()
public void setUpper(int upperBoundary)
upperBoundary
- the upperBoundary to set