public class ExactMatch extends StatusEvaluatorImpl
StatusEvaluator
for use with BranchingHttpRequestService
.
Matches a service id against an exact http response code. e.g. statusCode=200 to match HTTP OK
. It's an exact match; you
probably don't want to use it, as you'll have to specify one for 202 Accepted
, one for 201 Created
etc. even
though they're all would logically point to the same success ervice id.
In the adapter configuration file this class is aliased as http-status-exact-match which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
ExactMatch() |
ExactMatch(int code,
java.lang.String serviceId) |
Modifier and Type | Method and Description |
---|---|
int |
getStatusCode() |
boolean |
matches(int responseCode)
Do we match the http status
|
void |
setStatusCode(int s) |
getServiceId, serviceId, setServiceId
public ExactMatch()
public ExactMatch(int code, java.lang.String serviceId)
public boolean matches(int responseCode)
StatusEvaluator
responseCode
- the HTTP server response code (e.g. 500)public int getStatusCode()
public void setStatusCode(int s)
s
- the responseCode to set