public class BlacklistEntry
extends java.lang.Object
| Constructor and Description |
|---|
BlacklistEntry(java.lang.String urlPattern,
int statusCode)
Creates a new BlacklistEntry with no HTTP method matching (i.e.
|
BlacklistEntry(java.lang.String urlPattern,
int statusCode,
java.lang.String httpMethodPattern)
Creates a new BlacklistEntry which will match both a URL and an HTTP method
|
| Modifier and Type | Method and Description |
|---|---|
java.util.regex.Pattern |
getHttpMethodPattern() |
java.util.regex.Pattern |
getMethod()
Deprecated.
|
java.util.regex.Pattern |
getPattern()
Deprecated.
|
int |
getResponseCode()
Deprecated.
|
int |
getStatusCode() |
java.util.regex.Pattern |
getUrlPattern() |
boolean |
matches(java.lang.String url,
java.lang.String httpMethod)
Determines if this BlacklistEntry matches the given URL.
|
public BlacklistEntry(java.lang.String urlPattern,
int statusCode)
urlPattern - URL pattern to blackliststatusCode - HTTP status code to return for blacklisted URLpublic BlacklistEntry(java.lang.String urlPattern,
int statusCode,
java.lang.String httpMethodPattern)
urlPattern - URL pattern to blackliststatusCode - status code to return for blacklisted URLhttpMethodPattern - HTTP method to match (e.g. GET, PUT, PATCH, etc.)public boolean matches(java.lang.String url,
java.lang.String httpMethod)
url - possibly-blacklisted URLhttpMethod - HTTP method this URL is being accessed withpublic java.util.regex.Pattern getUrlPattern()
public int getStatusCode()
public java.util.regex.Pattern getHttpMethodPattern()
@Deprecated public java.util.regex.Pattern getPattern()
@Deprecated public int getResponseCode()
@Deprecated public java.util.regex.Pattern getMethod()