Class Handler

java.lang.Object
io.micronaut.function.executor.AbstractExecutor<C>
io.micronaut.function.executor.AbstractFunctionExecutor<I,O,com.amazonaws.services.lambda.runtime.Context>
io.micronaut.function.aws.MicronautRequestHandler<com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent,com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent>
All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestHandler<com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent,com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent>, io.micronaut.context.ApplicationContextProvider, io.micronaut.function.aws.MicronautLambdaContext, io.micronaut.function.executor.FunctionExecutor<com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent,com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent>, Closeable, AutoCloseable

AWS Lambda Handler for a Telegram Bot Webhook.
Since:
1.0.0
Author:
Sergio del Amo
  • Field Summary

    Fields inherited from class io.micronaut.function.aws.MicronautRequestHandler

    ENV_X_AMZN_TRACE_ID, LAMBDA_TRACE_HEADER_PROP

    Fields inherited from class io.micronaut.function.executor.AbstractExecutor

    applicationContext

    Fields inherited from interface io.micronaut.function.aws.MicronautLambdaContext

    ENVIRONMENT_LAMBDA
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor; will initialize a suitable ApplicationContext for Lambda deployment.
    Handler(io.micronaut.context.ApplicationContext applicationContext)
    Constructor used to inject a preexisting ApplicationContext.
    Handler(io.micronaut.context.ApplicationContextBuilder applicationContextBuilder)
    Constructor used to inject a preexisting ApplicationContextBuilder.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    protected @NonNull io.micronaut.serde.ObjectMapper
     
    protected @NonNull com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent
    okSerializer(@NonNull Object body)
     
    parseBot(@NonNull com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent request)
     
    protected @io.micronaut.core.annotation.NonNull boolean
    validate(@NonNull com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent request)
     

    Methods inherited from class io.micronaut.chatbots.lambda.AbstractHandler

    execute, ok, ok, okHtml, okJson, parseHeader, response, serverError, unauthorized

    Methods inherited from class io.micronaut.function.aws.MicronautRequestHandler

    buildApplicationContext, convertInput, handleRequest, newApplicationContextBuilder

    Methods inherited from class io.micronaut.function.executor.AbstractExecutor

    close, getApplicationContext, resolveFunction, resolveFunctionName, startEnvironment

    Methods inherited from class java.lang.Object

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

    • Handler

      public Handler()
      Default constructor; will initialize a suitable ApplicationContext for Lambda deployment.
    • Handler

      public Handler(io.micronaut.context.ApplicationContext applicationContext)
      Constructor used to inject a preexisting ApplicationContext.
      Parameters:
      applicationContext - the application context
    • Handler

      public Handler(io.micronaut.context.ApplicationContextBuilder applicationContextBuilder)
      Constructor used to inject a preexisting ApplicationContextBuilder.
      Parameters:
      applicationContextBuilder - the application context builder
  • Method Details