Serializable, Comparable<RateLimitType>public enum RateLimitType extends Enum<RateLimitType>
| Enum Constant | Description |
|---|---|
HTTP_METHOD |
Rate limit policy considering the HTTP request method.
|
HTTPMETHOD |
Deprecated.
See
HTTP_METHOD |
ORIGIN |
Rate limit policy considering the user's origin.
|
ROLE |
Rate limit policy considering the authenticated user's role.
|
URL |
Rate limit policy considering the request path to the downstream service.
|
URL_PATTERN |
Rate limit policy considering an URL Pattern
|
USER |
Rate limit policy considering the authenticated user.
|
| Modifier and Type | Method | Description |
|---|---|---|
abstract boolean |
apply(javax.servlet.http.HttpServletRequest request,
org.springframework.cloud.netflix.zuul.filters.Route route,
RateLimitUtils rateLimitUtils,
String matcher) |
|
boolean |
isValid(String matcher) |
Helper method to validate specific cases per type.
|
abstract String |
key(javax.servlet.http.HttpServletRequest request,
org.springframework.cloud.netflix.zuul.filters.Route route,
RateLimitUtils rateLimitUtils,
String matcher) |
|
static RateLimitType |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static RateLimitType[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RateLimitType ORIGIN
public static final RateLimitType USER
public static final RateLimitType URL
public static final RateLimitType ROLE
@Deprecated public static final RateLimitType HTTPMETHOD
HTTP_METHODpublic static final RateLimitType HTTP_METHOD
public static final RateLimitType URL_PATTERN
public static RateLimitType[] values()
for (RateLimitType c : RateLimitType.values()) System.out.println(c);
public static RateLimitType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract boolean apply(javax.servlet.http.HttpServletRequest request,
org.springframework.cloud.netflix.zuul.filters.Route route,
RateLimitUtils rateLimitUtils,
String matcher)
public abstract String key(javax.servlet.http.HttpServletRequest request, org.springframework.cloud.netflix.zuul.filters.Route route, RateLimitUtils rateLimitUtils, String matcher)
public boolean isValid(String matcher)
matcher - The type matcherCopyright © 2019. All rights reserved.