Class RateLimitInterceptor

java.lang.Object
org.omnifaces.cdi.ratelimit.RateLimitInterceptor

@Dependent @Interceptor @Priority(1000) public class RateLimitInterceptor extends Object

CDI interceptor that enforces rate limiting on methods annotated with RateLimit.

This interceptor intercepts method invocations and checks if the rate limit has been exceeded for the specified client identifier. If the rate limit is exceeded, a RateLimitExceededException is thrown. Otherwise, the method execution continues normally.

The interceptor automatically resolves the client identifier from the annotation configuration, falling back to the client IP address from the current HTTP request if no explicit client ID is provided.

Since:
5.0
Author:
Bauke Scholtz
See Also: