Skip to content

Commit

Permalink
add javadoc, test and @factory
Browse files Browse the repository at this point in the history
  • Loading branch information
sdelamo committed Jul 1, 2024
1 parent e11a6bf commit 1149df3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
import io.micronaut.aws.sdk.v2.service.AwsClientFactory;
import io.micronaut.aws.ua.UserAgentProvider;
import io.micronaut.context.annotation.Bean;
import io.micronaut.context.annotation.Factory;
import io.micronaut.context.annotation.Requires;
import io.micronaut.core.annotation.Internal;
import io.micronaut.core.annotation.Nullable;
import jakarta.inject.Named;
import jakarta.inject.Singleton;
Expand All @@ -32,8 +34,13 @@
import software.amazon.awssdk.services.lambda.LambdaClient;
import software.amazon.awssdk.services.lambda.LambdaClientBuilder;


public class LambdaClientFactory extends AwsClientFactory<LambdaClientBuilder, LambdaAsyncClientBuilder, LambdaClient, LambdaAsyncClient> {
/**
* Factory that creates {@link LambdaClient} and {@link LambdaAsyncClient}.
* @since 4.7.0
*/
@Factory
@Internal
class LambdaClientFactory extends AwsClientFactory<LambdaClientBuilder, LambdaAsyncClientBuilder, LambdaClient, LambdaAsyncClient> {
/**
* Constructor.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package io.micronaut.aws.sdk.v2.service

import software.amazon.awssdk.services.lambda.LambdaAsyncClient
import software.amazon.awssdk.services.lambda.LambdaClient

class LambdaClientSpec extends ServiceClientSpec<LambdaClient, LambdaAsyncClient> {
@Override
protected String serviceName() {
return LambdaClient.SERVICE_NAME
}

@Override
protected LambdaClient getClient() {
applicationContext.getBean(LambdaClient)
}

protected LambdaAsyncClient getAsyncClient() {
applicationContext.getBean(LambdaAsyncClient)
}
}

0 comments on commit 1149df3

Please sign in to comment.