- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Wraps the execution of a
RestHandler-
Method Summary
Modifier and TypeMethodDescriptionvoidintercept(RestRequest request, RestChannel channel, RestHandler targetHandler, ActionListener<Boolean> listener)
-
Method Details
-
intercept
void intercept(RestRequest request, RestChannel channel, RestHandler targetHandler, ActionListener<Boolean> listener) throws Exception - Parameters:
listener- The interceptor responds withTrueif the handler should be called, orFalseif the request has been entirely handled by the interceptor. In the case ofActionListener.onFailure(Exception), the target handler will not be called, the request will be treated as unhandled, and the regular rest exception handling will be performed- Throws:
Exception
-