Class LambdaInvokerFactory
java.lang.Object
com.amazonaws.services.lambda.invoke.LambdaInvokerFactory
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
Modifier and TypeMethodDescriptionstatic <T> T
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 Details
-
build
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
-