public class HTTPStatusCodeWildcardFilter
extends java.lang.Object
Example: filter = "* !3* !4*";Note that an empty string is an invalid filter. Use "*" to match any HTTP status code.
Constructor and Description |
---|
HTTPStatusCodeWildcardFilter(java.lang.String statusCodeFilter)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getStatusCodeFilter()
Get the HTTP status code filter.
|
boolean |
matchFilter(int httpStatusCode)
Filter a HTTP status code.
|
void |
setStatusCodeFilter(java.lang.String statusCodeFilter)
Set a new HTTP status code filter.
|
public HTTPStatusCodeWildcardFilter(java.lang.String statusCodeFilter)
statusCodeFilter
- a list of HTTP status codes, separated by comma, semicolon or space char, which can contain '*' and '?' wildcards, an '!' (exclamation char) in front of a HTTP status code means 'exclude the HTTP status code'matchFilter(int)
public java.lang.String getStatusCodeFilter()
public void setStatusCodeFilter(java.lang.String statusCodeFilter) throws java.lang.IllegalArgumentException
statusCodeFilter
- a list of HTTP status codes, separated by comma, semicolon or space char, which can contain '*' and '?' wildcards, an '!' (exclamation char) in front of a HTTP status code means 'exclude the HTTP status code'java.lang.IllegalArgumentException
- if the filter contains invalid values, or no values, or only excluded valuespublic boolean matchFilter(int httpStatusCode)
httpStatusCode
- the HTTP status code (without wildcards) to filter