Package org.kigalisim.cloud
Class SimulationHandler
java.lang.Object
org.kigalisim.cloud.SimulationHandler
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestHandler<com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent,com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponse>
public class SimulationHandler
extends Object
implements com.amazonaws.services.lambda.runtime.RequestHandler<com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent,com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponse>
Lambda handler that accepts a QubecTalk script via query string and returns CSV output.
Implements the AWS Lambda Function URL / API Gateway HTTP API contract. If one or more
comma-separated simulation names are provided, the handler runs the requested
number of replicates of each named scenario in order and returns all results combined in a
single CSV response with Content-Type: text/csv. If simulation is omitted,
the script is validated only and a header-only CSV is returned with status 200.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponsehandleRequest(com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent event, com.amazonaws.services.lambda.runtime.Context context) Handles an incoming Lambda HTTP event by running a QubecTalk simulation.
-
Constructor Details
-
SimulationHandler
public SimulationHandler()Constructs a new SimulationHandler.
-
-
Method Details
-
handleRequest
public com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponse handleRequest(com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent event, com.amazonaws.services.lambda.runtime.Context context) Handles an incoming Lambda HTTP event by running a QubecTalk simulation.- Specified by:
handleRequestin interfacecom.amazonaws.services.lambda.runtime.RequestHandler<com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent,com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponse> - Parameters:
event- The API Gateway V2 HTTP event containing query string parameters.context- The Lambda execution context (unused).- Returns:
- An API Gateway V2 HTTP response with either CSV output or a plain-text error.
-