Interceptor for non blocking operations #28637
Unanswered
ichrist-gr
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Should not be a problem; you do the following; @AroundInvoke
Object uniInceptor(InvocationContext context) {
Object ret = null;
try {
ret = context.proceed();
if (ret instanceof Uni) {
return ((Uni<?>) ret).onFailure().....//do anything here
}
} catch (Exception e) {
log.error("Uni interceptor failed", e);
}
return ret;
} |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
i'm using resteasy-reactive and i want to implement an interceptor to check the health status of another rest endpoint.
So, when calling a reactive rest endpoint the method signature will be Uni<?>. The problem is that the method signature of my Interceptor must return Object. Do we have any suggestions on how to implement this via interceptor?
Beta Was this translation helpful? Give feedback.
All reactions