I
- input typeO
- output type@Requires(beans=com.amazonaws.services.lambda.AWSLambdaAsync.class) @Singleton public class AWSLambdaFunctionExecutor<I,O> extends Object implements FunctionInvoker<I,O>, FunctionInvokerChooser
FunctionInvoker
for invoking functions on AWS.Modifier | Constructor and Description |
---|---|
protected |
AWSLambdaFunctionExecutor(com.amazonaws.services.lambda.AWSLambdaAsync asyncClient,
ByteBufferFactory byteBufferFactory,
JsonMediaTypeCodec jsonMediaTypeCodec,
ExecutorService ioExecutor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<I1,O2> Optional<FunctionInvoker<I1,O2>> |
choose(FunctionDefinition definition)
Chooses a
FunctionInvoker . |
O |
invoke(FunctionDefinition definition,
I input,
Argument<O> outputType)
Invoke the given function definition for the given input and expected response type.
|
protected AWSLambdaFunctionExecutor(com.amazonaws.services.lambda.AWSLambdaAsync asyncClient, ByteBufferFactory byteBufferFactory, JsonMediaTypeCodec jsonMediaTypeCodec, @Named(value="io") ExecutorService ioExecutor)
asyncClient
- asyncClientbyteBufferFactory
- byteBufferFactoryjsonMediaTypeCodec
- jsonMediaTypeCodecioExecutor
- ioExecutorpublic O invoke(FunctionDefinition definition, I input, Argument<O> outputType)
FunctionInvoker
invoke
in interface FunctionInvoker<I,O>
definition
- The definitioninput
- The inputoutputType
- The response typepublic <I1,O2> Optional<FunctionInvoker<I1,O2>> choose(FunctionDefinition definition)
FunctionInvokerChooser
FunctionInvoker
.choose
in interface FunctionInvokerChooser
I1
- input typeO2
- output typedefinition
- The definitionOptional
instance of FunctionInvoker