Class 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 java.lang.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
      OfficeFloorSam()
      Default constructor required by AWS.
      OfficeFloorSam​(boolean isLog)
      Instantiate.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void close()
      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 open()
      Opens the OfficeFloor.
      • Methods inherited from class java.lang.Object

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

      • OfficeFloorSam

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

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

      • open

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

        public static void close()
                          throws java.lang.Exception

        Closes the OfficeFloor.

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

        Throws:
        java.lang.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>