Class RequestArgumentSatisfier


  • @Singleton
    @Internal
    public class RequestArgumentSatisfier
    extends java.lang.Object
    A class containing methods to aid in satisfying arguments of a Route.
    Since:
    1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      RequestArgumentSatisfier​(io.micronaut.http.bind.RequestBinderRegistry requestBinderRegistry)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.micronaut.web.router.RouteMatch<?> fulfillArgumentRequirements​(io.micronaut.web.router.RouteMatch<?> route, io.micronaut.http.HttpRequest<?> request, boolean satisfyOptionals)
      Attempt to satisfy the arguments of the given route with the data from the given request.
      io.micronaut.http.bind.RequestBinderRegistry getBinderRegistry()  
      protected java.util.Optional<java.lang.Object> getValueForArgument​(io.micronaut.core.type.Argument argument, io.micronaut.http.HttpRequest<?> request, boolean satisfyOptionals)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestArgumentSatisfier

        public RequestArgumentSatisfier​(io.micronaut.http.bind.RequestBinderRegistry requestBinderRegistry)
        Parameters:
        requestBinderRegistry - The Request binder registry
    • Method Detail

      • getBinderRegistry

        public io.micronaut.http.bind.RequestBinderRegistry getBinderRegistry()
        Returns:
        The request binder registry
      • fulfillArgumentRequirements

        public io.micronaut.web.router.RouteMatch<?> fulfillArgumentRequirements​(io.micronaut.web.router.RouteMatch<?> route,
                                                                                 io.micronaut.http.HttpRequest<?> request,
                                                                                 boolean satisfyOptionals)
        Attempt to satisfy the arguments of the given route with the data from the given request.
        Parameters:
        route - The route
        request - The request
        satisfyOptionals - Whether to satisfy optionals
        Returns:
        The route
      • getValueForArgument

        protected java.util.Optional<java.lang.Object> getValueForArgument​(io.micronaut.core.type.Argument argument,
                                                                           io.micronaut.http.HttpRequest<?> request,
                                                                           boolean satisfyOptionals)
        Parameters:
        argument - The argument
        request - The HTTP request
        satisfyOptionals - Whether to satisfy optionals
        Returns:
        An Optional for the value