Class OfficeFloorSam

java.lang.Object
net.officefloor.server.aws.sam.OfficeFloorSam
All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestHandler<com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent,com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent>

public class OfficeFloorSam extends Object implements com.amazonaws.services.lambda.runtime.RequestHandler<com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent,com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent>
Handles the APIGatewayProxyRequestEvent.
Author:
Daniel Sagenschneider
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor required by AWS.
    OfficeFloorSam(boolean isLog)
    Instantiate.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Closes the OfficeFloor.
    com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent
    handleRequest(com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent input, com.amazonaws.services.lambda.runtime.Context context)
    ======================= RequestHandler =========================
    static void
    Opens the OfficeFloor.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OfficeFloorSam

      public OfficeFloorSam(boolean isLog)
      Instantiate.
      Parameters:
      isLog - Indicates if log.
    • OfficeFloorSam

      public OfficeFloorSam()
      Default constructor required by AWS.
  • Method Details

    • open

      public static void open() throws Exception
      Opens the OfficeFloor.
      Throws:
      Exception - If fails to open the OfficeFloor.
    • close

      public static void close() throws Exception

      Closes the OfficeFloor.

      AWS should just discard instances. Therefore, this is mainly for testing.

      Throws:
      Exception - If fails to close the OfficeFloor.
    • handleRequest

      public com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent handleRequest(com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent input, com.amazonaws.services.lambda.runtime.Context context)
      ======================= RequestHandler =========================
      Specified by:
      handleRequest in interface com.amazonaws.services.lambda.runtime.RequestHandler<com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent,com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent>