Interface CloudRequestHandler<I,O>
- Type Parameters:
I- the input type (e.g., deserialized JSON request body)O- the output type (e.g., response body)
This interface defines the contract for processing function invocations. It is used by the runtime to delegate the execution of a function with deserialized input and request context.
Note: Implementing this interface manually is no longer required in most cases.
If a method is annotated with Function, a corresponding
implementation of this interface will be generated automatically during annotation processing.
Advanced users may still implement this interface directly to provide custom invocation logic or to bypass the code generation step.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault OhandleRequest(I input, HandlerContext context) Handles a simplified function invocation with only input and context.handleRequest(I input, Map<String, String> pathParams, Map<String, String> queryParams, HandlerContext context) Handles an incoming request with full request metadata.
-
Method Details
-
handleRequest
Handles a simplified function invocation with only input and context.This default method delegates to the full handler method with empty path and query parameter maps.
- Parameters:
input- the deserialized input objectcontext- runtime context information about the invocation- Returns:
- the response object
-
handleRequest
O handleRequest(I input, Map<String, String> pathParams, Map<String, String> queryParams, HandlerContext context) Handles an incoming request with full request metadata.This method provides access to HTTP path and query parameters in addition to the input and context. It is typically invoked by the generated infrastructure code.
- Parameters:
input- the deserialized input object (e.g., request body)pathParams- map of path parameters extracted from the request URLqueryParams- map of query parameterscontext- runtime context information about the invocation- Returns:
- the response object
-