Package io.micronaut.http.server.binding
Class RouteMatchArgumentBinder
java.lang.Object
io.micronaut.http.server.binding.RouteMatchArgumentBinder
- All Implemented Interfaces:
ArgumentBinder<RouteMatch<?>,,HttpRequest<?>> TypeArgumentBinder<RouteMatch<?>,,HttpRequest<?>> RequestArgumentBinder<RouteMatch<?>>,TypedRequestArgumentBinder<RouteMatch<?>>,FilterArgumentBinderPredicate
@Singleton
public final class RouteMatchArgumentBinder
extends Object
implements TypedRequestArgumentBinder<RouteMatch<?>>, FilterArgumentBinderPredicate
Argument binder for
RouteMatch objects.- Since:
- 4.6.0
- Author:
- Jonas Konrad
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.core.bind.ArgumentBinder
ArgumentBinder.BindingResult<T> -
Method Summary
Modifier and TypeMethodDescriptionArgument<RouteMatch<?>>bind(ArgumentConversionContext<RouteMatch<?>> context, HttpRequest<?> source) Bind the given argument from the given source.booleantest(Argument<?> argument, MutablePropagatedContext mutablePropagatedContext, HttpRequest<?> request, @Nullable HttpResponse<?> response, @Nullable Throwable failure) Check whether the filter method should run in the given context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.bind.binders.TypedRequestArgumentBinder
matches, superTypes
-
Method Details
-
argumentType
- Specified by:
argumentTypein interfaceTypeArgumentBinder<RouteMatch<?>,HttpRequest<?>> - Returns:
- The argument type.
-
bind
public ArgumentBinder.BindingResult<RouteMatch<?>> bind(ArgumentConversionContext<RouteMatch<?>> context, HttpRequest<?> source) Description copied from interface:ArgumentBinderBind the given argument from the given source.- Specified by:
bindin interfaceArgumentBinder<RouteMatch<?>,HttpRequest<?>> - Parameters:
context- TheArgumentConversionContextsource- The source- Returns:
- An
Optionalof the value. If no binding was possibleOptional.empty()
-
test
public boolean test(Argument<?> argument, MutablePropagatedContext mutablePropagatedContext, HttpRequest<?> request, @Nullable @Nullable HttpResponse<?> response, @Nullable @Nullable Throwable failure) Description copied from interface:FilterArgumentBinderPredicateCheck whether the filter method should run in the given context.- Specified by:
testin interfaceFilterArgumentBinderPredicate- 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
-