tech.deepdreams.worker.lambda.LambdaRequestHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of worker-lambda Show documentation
Show all versions of worker-lambda Show documentation
Payroll Worker Lambda project for Java 17
package tech.deepdreams.worker.lambda;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
import tech.deepdreams.worker.input.PayrollRequest;
import tech.deepdreams.worker.output.PayrollResponse;
public class LambdaRequestHandler implements RequestHandler {
public PayrollResponse handleRequest(PayrollRequest request, Context context) {
context.getLogger().log("Request : " + request.getCountryCode() + " - " + request.getAlgoVersion()) ;
LambdaContext lambdaContext = new LambdaContext(request.getCountryCode(), request.getAlgoVersion()) ;
PayrollResponse response = lambdaContext.calculate(request) ;
context.getLogger().log("Response : " + response) ;
return response ;
}
}