@Singleton
public class RateLimitingSupport
extends java.lang.Object
Constructor and Description |
---|
RateLimitingSupport(RateLimitingConfiguration configuration)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Optional<io.micronaut.core.annotation.AnnotationMetadata> |
getAnnotationMetadata(io.micronaut.http.HttpRequest<?> request) |
java.util.Optional<java.lang.String> |
getConfigurationName(io.micronaut.http.HttpRequest<?> request) |
boolean |
shouldLimit(io.micronaut.http.HttpRequest<?> request) |
public RateLimitingSupport(RateLimitingConfiguration configuration)
configuration
- The rate limiting configurationpublic boolean shouldLimit(io.micronaut.http.HttpRequest<?> request)
request
- The requestpublic java.util.Optional<java.lang.String> getConfigurationName(io.micronaut.http.HttpRequest<?> request)
request
- The requestprotected java.util.Optional<io.micronaut.core.annotation.AnnotationMetadata> getAnnotationMetadata(io.micronaut.http.HttpRequest<?> request)
request
- The request