Class DefaultLambdaContextFactory

java.lang.Object
io.micronaut.function.aws.DefaultLambdaContextFactory
All Implemented Interfaces:
LambdaContextFactory

@Singleton public class DefaultLambdaContextFactory extends Object implements LambdaContextFactory
Registers singletons of type Context. If the Lambda Context contains non-null LambdaLogger, ClientContext and CognitoIdentity they are registered as Singleton as well.
Since:
3.2.2
Author:
Sergio del Amo
  • Constructor Details

    • DefaultLambdaContextFactory

      public DefaultLambdaContextFactory(io.micronaut.context.BeanContext beanContext)
      Parameters:
      beanContext - Bean Context.
  • Method Details

    • registerSingletons

      public void registerSingletons(@NonNull @NonNull com.amazonaws.services.lambda.runtime.Context context)
      Description copied from interface: LambdaContextFactory
      Registers Lambda Context as a singleton.
      Specified by:
      registerSingletons in interface LambdaContextFactory
      Parameters:
      context - Lambda Context