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
    Constructor
    Description
    Constructs a new SimulationHandler.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      handleRequest in interface com.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.