public class BlacklistEntry extends Object
Constructor and Description |
---|
BlacklistEntry(String urlPattern,
int statusCode)
Creates a new BlacklistEntry with no HTTP method matching (i.e.
|
BlacklistEntry(String urlPattern,
int statusCode,
String httpMethodPattern)
Creates a new BlacklistEntry which will match both a URL and an HTTP method
|
Modifier and Type | Method and Description |
---|---|
Pattern |
getHttpMethodPattern() |
Pattern |
getMethod()
Deprecated.
|
Pattern |
getPattern()
Deprecated.
|
int |
getResponseCode()
Deprecated.
|
int |
getStatusCode() |
Pattern |
getUrlPattern() |
boolean |
matches(String url,
String httpMethod)
Determines if this BlacklistEntry matches the given URL.
|
public BlacklistEntry(String urlPattern, int statusCode)
urlPattern
- URL pattern to blackliststatusCode
- HTTP status code to return for blacklisted URLpublic BlacklistEntry(String urlPattern, int statusCode, 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(String url, String httpMethod)
url
- possibly-blacklisted URLhttpMethod
- HTTP method this URL is being accessed withpublic Pattern getUrlPattern()
public int getStatusCode()
public Pattern getHttpMethodPattern()
@Deprecated public Pattern getPattern()
@Deprecated public int getResponseCode()
@Deprecated public Pattern getMethod()
Copyright © 2016. All Rights Reserved.