Package io.micronaut.http.filter
Interface FilterArgumentBinderPredicate
public interface FilterArgumentBinderPredicate
Additional interface that
ArgumentBinder
s can implement to
restrict when a filter method with this argument will run.- Since:
- 4.6.0
- Author:
- Jonas Konrad
-
Method Summary
Modifier and TypeMethodDescriptionboolean
test
(Argument<?> argument, MutablePropagatedContext mutablePropagatedContext, HttpRequest<?> request, @Nullable HttpResponse<?> response, @Nullable Throwable failure) Check whether the filter method should run in the given context.
-
Method Details
-
test
boolean test(Argument<?> argument, MutablePropagatedContext mutablePropagatedContext, HttpRequest<?> request, @Nullable @Nullable HttpResponse<?> response, @Nullable @Nullable Throwable failure) Check whether the filter method should run in the given context.- Parameters:
argument
- The argument that this binder bindsmutablePropagatedContext
- The propagated contextrequest
- The requestresponse
- For response filters, the response (if there is no failure)failure
- For response filters, the failure- Returns:
true
if this filter method should run
-