Open lestephane opened 4 years ago
hmm, The user has to import AwsLambdaEndpoint anyway, so maybe the import argument is not as relevant, but the implements
clause must be there, and delegate()
as a method name is dubious. The fact that the instance is used as a delegate should not be reflected in the method name.
I agree that the method name is dubious. We might be able to create an AWS Lambda endpoint without having a dependency on the AWS SDK at all. In this case, the implements
will not be possible. Otherwise, we will add it.
Maybe use RequestHandler<Map<String,String>, String>
so we can add ApiGatewayV2 (aka httpapi) without changing callers later.
Is the use of RequestStreamHandler made impossible by the use of MessageMaid? It could be another way to have a single interface covering all cases (restapi, httpapi)
Map<String, Object
is the current work in progress, which will theoretically be able to handle all types of lambda events. I only looked at RequestStreamHandler briefly. As far as I understand, it provides the same information as a Map<String, Object>
handler would, just as a stream. It could offer performance improvements, but will not add more flexibility. MapMaid is currently not used for parsing lambda events.
Describe the bug AwsLambdaEndpoint's main processing method is
It should instead be called
handleRequest()
and theAwsLambdaEndpoint
java class should be marked asimplements RequestHandler<APIGatewayProxyRequestEvent, APIGatewayProxyResponseEvent>
, so thatRequestHandler<APIGatewayProxyRequestEvent, APIGatewayProxyResponseEvent>
, so thatimport
the RequestHandler interface from the AWS SDK. This is important since QuantumMaid promises not to force devs to import quantummaid classes and interfaces.