Interface IAPIExecutor

  • All Superinterfaces:
    Serializable
    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 IAPIExecutor
    extends Serializable
    Interface for API executors. Implementations of this class contain the business logic that is mapped to a certain URL path.
    Author:
    Philip Helger
    • Method Detail

      • invokeAPI

        void invokeAPI​(@Nonnull
                       IAPIDescriptor aAPIDescriptor,
                       @Nonnull @Nonempty
                       String sPath,
                       @Nonnull
                       Map<String,​String> aPathVariables,
                       @Nonnull
                       com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope,
                       @Nonnull
                       com.helger.servlet.response.UnifiedResponse aUnifiedResponse)
                throws Exception
        Parameters:
        aAPIDescriptor - The base API descriptor which is invoked. Never null.
        sPath - The invoked path by the user. Neither null nor empty. All potential variable elements were already resolved. The mapping of the source path variables is contained in the path variable parameter.
        aPathVariables - The resolved variable path parts according to the underlying IAPIDescriptor. Never null.
        aRequestScope - The current request scope. Never null.
        aUnifiedResponse - The unified response to be filled. Never null.
        Throws:
        Exception - In case of an error