private CompletableFuture<InvokeResponse> callLambda(InvocationType type, IN input) { log.debug("calling '{}' as {} with payload: {}", functionName, type, input); ByteBuffer payload = serialize(input); InvokeRequest request = InvokeRequest.builder() .functionName(functionName) .invocationType(type) .payload(payload) .build(); return lambda.invoke(request); }
/** * Invoke a JSON-RPC method asynchronously without compile-time type-checking. * * <p>This overload is private, because it should only be used by the {@link * JsonRpcLambdaProxyAdapter} (which requires a non-typesafe invoke method). */ private CompletableFuture<Object> invokeAsync(String methodName, Object argument, Type returnType) throws IOException { ByteBuffer requestPayload = writeRequest(methodName, argument); InvokeRequest invokeRequest = InvokeRequest.builder().functionName(functionName).payload(requestPayload).build(); CompletableFuture<InvokeResponse> pendingRequest = lambda.invoke(invokeRequest); return pendingRequest.thenApply(r -> readResponse(returnType, r)); }
KmsInvalidStateException, KmsAccessDeniedException, KmsNotFoundException, InvalidRuntimeException, AwsServiceException, SdkClientException, LambdaException { return invoke(InvokeRequest.builder().applyMutation(invokeRequest).build());
return invoke(InvokeRequest.builder().applyMutation(invokeRequest).build());
KmsInvalidStateException, KmsAccessDeniedException, KmsNotFoundException, InvalidRuntimeException, AwsServiceException, SdkClientException, LambdaException { return invoke(InvokeRequest.builder().applyMutation(invokeRequest).build());
return invoke(InvokeRequest.builder().applyMutation(invokeRequest).build());