Package com.helger.photon.api
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinvokeAPI(IAPIDescriptor aAPIDescriptor, String sPath, Map<String,String> aPathVariables, com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.servlet.response.UnifiedResponse aUnifiedResponse)
-
-
-
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. Nevernull.sPath- The invoked path by the user. Neithernullnor 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 underlyingIAPIDescriptor. Nevernull.aRequestScope- The current request scope. Nevernull.aUnifiedResponse- The unified response to be filled. Nevernull.- Throws:
Exception- In case of an error
-
-