Class LambdaInvokerFactory
- java.lang.Object
-
- com.amazonaws.services.lambda.invoke.LambdaInvokerFactory
-
public final class LambdaInvokerFactory extends Object
A factory for objects that implement a user-supplied interface by invoking a remote Lambda function.public class Request { // Standard POJO stuff here modeling the input your Lambda function // expects. } public class Result { // More standard POJO stuff here modeling the output your Lambda // function produces. } public interface LambdaFunctions {
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
build(Class<T> interfaceClass, AWSLambda awsLambda)
Creates a new Lambda invoker implementing the given interface and wrapping the givenAWSLambda
client.static <T> T
build(Class<T> interfaceClass, AWSLambda awsLambda, LambdaInvokerFactoryConfig config)
Creates a new Lambda invoker implementing the given interface and wrapping the givenAWSLambda
client.
-
-
-
Method Detail
-
build
public static <T> T build(Class<T> interfaceClass, AWSLambda awsLambda)
Creates a new Lambda invoker implementing the given interface and wrapping the givenAWSLambda
client.- Parameters:
interfaceClass
- the interface to implementawsLambda
- the lambda client to use for making remote calls
-
build
public static <T> T build(Class<T> interfaceClass, AWSLambda awsLambda, LambdaInvokerFactoryConfig config)
Creates a new Lambda invoker implementing the given interface and wrapping the givenAWSLambda
client.- Parameters:
interfaceClass
- the interface to implementawsLambda
- the lambda client to use for making remote callsconfig
- configuration for the LambdaInvokerFactory
-
-