Class AWSLambdaFunctionExecutor<I,O>

java.lang.Object
io.micronaut.function.client.aws.AWSLambdaFunctionExecutor<I,O>
Type Parameters:
I - input type
O - output type
All Implemented Interfaces:
io.micronaut.function.client.FunctionInvoker<I,O>, io.micronaut.function.client.FunctionInvokerChooser

@Requires(beans=com.amazonaws.services.lambda.AWSLambdaAsync.class) @Singleton public class AWSLambdaFunctionExecutor<I,O> extends Object implements io.micronaut.function.client.FunctionInvoker<I,O>, io.micronaut.function.client.FunctionInvokerChooser
A FunctionInvoker for invoking functions on AWS.
Since:
1.0
Author:
graemerocher
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AWSLambdaFunctionExecutor(com.amazonaws.services.lambda.AWSLambdaAsync asyncClient, io.micronaut.core.io.buffer.ByteBufferFactory byteBufferFactory, io.micronaut.jackson.codec.JsonMediaTypeCodec jsonMediaTypeCodec, ExecutorService ioExecutor)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    <I1, O2> Optional<io.micronaut.function.client.FunctionInvoker<I1,O2>>
    choose(io.micronaut.function.client.FunctionDefinition definition)
     
    invoke(io.micronaut.function.client.FunctionDefinition definition, I input, io.micronaut.core.type.Argument<O> outputType)
     

    Methods inherited from class java.lang.Object

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

    • AWSLambdaFunctionExecutor

      protected AWSLambdaFunctionExecutor(com.amazonaws.services.lambda.AWSLambdaAsync asyncClient, io.micronaut.core.io.buffer.ByteBufferFactory byteBufferFactory, io.micronaut.jackson.codec.JsonMediaTypeCodec jsonMediaTypeCodec, @Named("io") ExecutorService ioExecutor)
      Constructor.
      Parameters:
      asyncClient - asyncClient
      byteBufferFactory - byteBufferFactory
      jsonMediaTypeCodec - jsonMediaTypeCodec
      ioExecutor - ioExecutor
  • Method Details

    • invoke

      public O invoke(io.micronaut.function.client.FunctionDefinition definition, I input, io.micronaut.core.type.Argument<O> outputType)
      Specified by:
      invoke in interface io.micronaut.function.client.FunctionInvoker<I,O>
    • choose

      public <I1, O2> Optional<io.micronaut.function.client.FunctionInvoker<I1,O2>> choose(io.micronaut.function.client.FunctionDefinition definition)
      Specified by:
      choose in interface io.micronaut.function.client.FunctionInvokerChooser