Package io.micronaut.http.filter
Interface FilterArgumentBinderPredicate
public interface FilterArgumentBinderPredicate
Additional interface that
ArgumentBinders can implement to
restrict when a filter method with this argument will run.- Since:
- 4.6.0
- Author:
- Jonas Konrad
-
Method Summary
Modifier and TypeMethodDescriptionbooleantest(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:
trueif this filter method should run
-