Interface MiddlewareNext<I,O>

Type Parameters:
I - The input type
O - The output type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MiddlewareNext<I,O>
MiddlewareNext represents the next function in the middleware chain. It is used by middleware to pass control to the next middleware or the actual action.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(I request, ActionContext context)
    Calls the next middleware in the chain or the actual action.
  • Method Details

    • apply

      O apply(I request, ActionContext context) throws GenkitException
      Calls the next middleware in the chain or the actual action.
      Parameters:
      request - the input request (may be modified by the middleware)
      context - the action context (may be modified by the middleware)
      Returns:
      the output response
      Throws:
      GenkitException - if processing fails