@Test public void callUsesRequestReply() { function.callAsync(new TestInput("test")).join(); verify(client).invoke(requestArgument.capture()); assertThat( requestArgument.getValue().invocationType(), equalTo(InvocationType.RequestResponse.toString())); }
@Override public CompletableFuture<OUT> callAsync(IN input) { CompletableFuture<OUT> response = callLambda(InvocationType.RequestResponse, input).thenApply(this::deserialize); response.thenAccept(r -> log.debug("response from {}: {}", functionName, r)); return response; }
AwsSdkV2LambdaFunction implements LambdaFunction<IN, OUT> { @Override public CompletableFuture<OUT> callAsync(IN input) { CompletableFuture<OUT> response = callLambda(InvocationType.RequestResponse, input).thenApply(this::deserialize); response.thenAccept(r -> log.debug("response from {}: {}", functionName, r)); return response; } }
AwsSdkV2LambdaFunction implements LambdaFunction<IN, OUT> { @Override public CompletableFuture<OUT> callAsync(IN input) { CompletableFuture<OUT> response = callLambda(InvocationType.RequestResponse, input).thenApply(this::deserialize); response.thenAccept(r -> log.debug("response from {}: {}", functionName, r)); return response; } AwsSdkV2LambdaFunction(
      LambdaAsyncClient lambda, ObjectMapper mapper, Class<OUT> outputClass, String functionName); }
AwsSdkV2LambdaFunction implements LambdaFunction<IN, OUT> { @Override public CompletableFuture<OUT> callAsync(IN input) { CompletableFuture<OUT> response = callLambda(InvocationType.RequestResponse, input).thenApply(this::deserialize); response.thenAccept(r -> log.debug("response from {}: {}", functionName, r)); return response; } AwsSdkV2LambdaFunction(
      LambdaAsyncClient lambda, ObjectMapper mapper, Class<OUT> outputClass, String functionName); @Override CompletableFuture<OUT> callAsync(IN input); @Override CompletableFuture<Void> triggerAsync(IN input); }
AwsSdkV2LambdaFunction implements LambdaFunction<IN, OUT> { @Override public CompletableFuture<OUT> callAsync(IN input) { CompletableFuture<OUT> response = callLambda(InvocationType.RequestResponse, input).thenApply(this::deserialize); response.thenAccept(r -> log.debug("response from {}: {}", functionName, r)); return response; } AwsSdkV2LambdaFunction(
      LambdaAsyncClient lambda, ObjectMapper mapper, Class<OUT> outputClass, String functionName); @Override CompletableFuture<OUT> callAsync(IN input); @Override CompletableFuture<Void> triggerAsync(IN input);  }