com.amazonaws.services.lambda.invoke

## 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 {

         @LambdaFunction
         Result doSomeStuff(Request request);
     }
     LambdaFunctions functions = LambdaInvokerFactory.builder()
                                 .lambdaClient(AWSLambdaSyncClientBuilder.standard()
                                      .withCredentials(new ProfileCredentialsProvider("myprofile"))
                                      .build())
                                 .build(LambdaFunctions.class);
     Request request = new Request(...);
     Result result = functions.doSomeStuff(request);

### Nested Class Summary

Nested Classes
`static class` `LambdaInvokerFactory.Builder`

### Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods
`static <T> T` `build(Class<T> interfaceClass, AWSLambda awsLambda)` Deprecated. Use `builder()` to configure invoker factory.
`static <T> T` `build(Class<T> interfaceClass, AWSLambda awsLambda, LambdaInvokerFactoryConfig config)` Deprecated. Use `builder()` to configure invoker factory.
`static LambdaInvokerFactory.Builder` `builder()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### build

    @Deprecated
    public static <T> T build(Class<T> interfaceClass,
                                          AWSLambda awsLambda)

Deprecated. Use `builder()` to configure invoker factory.
Creates a new Lambda invoker implementing the given interface and wrapping the given `AWSLambda` client.

Parameters:
  `interfaceClass` - the interface to implement
  `awsLambda` - the lambda client to use for making remote calls

#### build

    @Deprecated
    public static <T> T build(Class<T> interfaceClass,
                                          AWSLambda awsLambda,
                                          LambdaInvokerFactoryConfig config)

Deprecated. Use `builder()` to configure invoker factory.
Creates a new Lambda invoker implementing the given interface and wrapping the given `AWSLambda` client.

Parameters:
  `interfaceClass` - the interface to implement
  `awsLambda` - the lambda client to use for making remote calls
  `config` - configuration for the LambdaInvokerFactory

#### builder

    public static LambdaInvokerFactory.Builder builder()

Returns:
  An instance of `LambdaInvokerFactory.Builder` to configure an invoker factory and build proxies for invoking remote lambda functions.