Class UnconsumedArgumentRelease

java.lang.Object
io.micronaut.http.server.binding.UnconsumedArgumentRelease

@Internal public final class UnconsumedArgumentRelease extends Object
Releases bound argument values that are owned by the route (for example a refcounted body) when the request ends before the route was invoked. Each value belongs to the route whose binding produced it, so invoking another route for the same request (an error or status route) does not take over the values of a route that never ran.
Since:
5.2.21
  • Method Details

    • add

      public static void add(LifecycleHttpRequest<?> request, Runnable release)
      Release a bound argument value with the request, unless the route that is currently matched for the request is invoked first.
      Parameters:
      request - The request
      release - Releases the value
    • routeInvoked

      public static void routeInvoked(HttpRequest<?> request, RouteInfo<?> routeInfo)
      Called when a route is invoked: the route now owns its argument values.
      Parameters:
      request - The request
      routeInfo - The invoked route