Class ReactorRateLimiterAspectExt
java.lang.Object
io.github.resilience4j.ratelimiter.configure.ReactorRateLimiterAspectExt
- All Implemented Interfaces:
RateLimiterAspectExt
the Reactor RateLimiter logic support for the spring AOP Conditional on Reactor class existence
on spring class loader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canHandleReturnType
(Class returnType) handle
(org.aspectj.lang.ProceedingJoinPoint proceedingJoinPoint, io.github.resilience4j.ratelimiter.RateLimiter rateLimiter, String methodName) handle the Spring web flux (Flux /Mono) return types AOP based into reactor rate limiter SeeRateLimiter
for details.
-
Constructor Details
-
ReactorRateLimiterAspectExt
public ReactorRateLimiterAspectExt()
-
-
Method Details
-
canHandleReturnType
- Specified by:
canHandleReturnType
in interfaceRateLimiterAspectExt
- Parameters:
returnType
- the AOP method return type class- Returns:
- boolean if the method has Reactor return type
-
handle
public Object handle(org.aspectj.lang.ProceedingJoinPoint proceedingJoinPoint, io.github.resilience4j.ratelimiter.RateLimiter rateLimiter, String methodName) throws Throwable handle the Spring web flux (Flux /Mono) return types AOP based into reactor rate limiter SeeRateLimiter
for details.- Specified by:
handle
in interfaceRateLimiterAspectExt
- Parameters:
proceedingJoinPoint
- Spring AOP proceedingJoinPointrateLimiter
- the configured rateLimitermethodName
- the method name- Returns:
- the result object
- Throws:
Throwable
- exception in case of faulty flow
-