Class AwsServiceClientImpl
- java.lang.Object
-
- com.mongodb.stitch.server.services.aws.internal.AwsServiceClientImpl
-
- All Implemented Interfaces:
AwsServiceClient
public final class AwsServiceClientImpl extends Object implements AwsServiceClient
-
-
Field Summary
-
Fields inherited from interface com.mongodb.stitch.server.services.aws.AwsServiceClient
factory
-
-
Constructor Summary
Constructors Constructor Description AwsServiceClientImpl(CoreAwsServiceClient client)
-
Method Summary
Modifier and Type Method Description voidexecute(AwsRequest request)Executes the AWS request.<ResultT> ResultTexecute(AwsRequest request, Class<ResultT> resultClass)Executes the AWS request, and decodes the result into an instance of the specified type.<ResultT> ResultTexecute(AwsRequest request, Class<ResultT> resultClass, CodecRegistry codecRegistry)Executes the AWS request, and decodes the result into an instance of the specified type.voidexecute(AwsRequest request, Long requestTimeout)Executes the AWS request.<ResultT> ResultTexecute(AwsRequest request, Long requestTimeout, Class<ResultT> resultClass)Executes the AWS request, and decodes the result into an instance of the specified type.<ResultT> ResultTexecute(AwsRequest request, Long requestTimeout, Class<ResultT> resultClass, CodecRegistry codecRegistry)Executes the AWS request, and decodes the result into an instance of the specified type.<ResultT> ResultTexecute(AwsRequest request, Long requestTimeout, Decoder<ResultT> resultDecoder)Executes the AWS request, and decodes the result into an instance of the specified type.<ResultT> ResultTexecute(AwsRequest request, Decoder<ResultT> resultDecoder)Executes the AWS request, and decodes the result into an instance of the specified type.CodecRegistrygetCodecRegistry()Get the codec registry that will be used to decode responses when a codec registry.AwsServiceClientwithCodecRegistry(CodecRegistry codecRegistry)Create a new AwsServiceClient instance with a different codec registry.
-
-
-
Constructor Detail
-
AwsServiceClientImpl
public AwsServiceClientImpl(CoreAwsServiceClient client)
-
-
Method Detail
-
execute
public void execute(AwsRequest request)
Executes the AWS request.- Specified by:
executein interfaceAwsServiceClient- Parameters:
request- the AWS request to execute.
-
execute
public <ResultT> ResultT execute(AwsRequest request, Decoder<ResultT> resultDecoder)
Executes the AWS request, and decodes the result into an instance of the specified type. The response will be decoded using the codec registry specified when the app client was configured. If no codec registry was configured, a default codec registry will be used. The default codec registry supports the mappings specified here- Specified by:
executein interfaceAwsServiceClient- Type Parameters:
ResultT- the type into which the response will be decoded.- Parameters:
request- the AWS request to execute.resultDecoder- theDecoderto use to decode the result into a value.- Returns:
- the decoded result value.
-
execute
public <ResultT> ResultT execute(AwsRequest request, Class<ResultT> resultClass)
Executes the AWS request, and decodes the result into an instance of the specified type. The response will be decoded using the codec registry specified when the app client was configured. If no codec registry was configured, a default codec registry will be used. The default codec registry supports the mappings specified here- Specified by:
executein interfaceAwsServiceClient- Type Parameters:
ResultT- the type into which the response will be decoded.- Parameters:
request- the AWS request to execute.resultClass- the class that the result should be decoded as.- Returns:
- the decoded result value.
-
execute
public <ResultT> ResultT execute(AwsRequest request, Class<ResultT> resultClass, CodecRegistry codecRegistry)
Executes the AWS request, and decodes the result into an instance of the specified type. The response will be decoded using the codec registry given.- Specified by:
executein interfaceAwsServiceClient- Type Parameters:
ResultT- the type into which the response will be decoded.- Parameters:
request- the AWS request to execute.resultClass- the class that the result should be decoded as.codecRegistry- the codec registry used for de/serialization of the function call.- Returns:
- the decoded result value.
-
execute
public void execute(AwsRequest request, Long requestTimeout)
Executes the AWS request.- Specified by:
executein interfaceAwsServiceClient- Parameters:
request- the AWS request to execute.requestTimeout- the number of milliseconds the client should wait for a response from the server before failing with an error.
-
execute
public <ResultT> ResultT execute(AwsRequest request, Long requestTimeout, Decoder<ResultT> resultDecoder)
Executes the AWS request, and decodes the result into an instance of the specified type. The response will be decoded using the codec registry specified when the app client was configured. If no codec registry was configured, a default codec registry will be used. The default codec registry supports the mappings specified here- Specified by:
executein interfaceAwsServiceClient- Type Parameters:
ResultT- the type into which the response will be decoded.- Parameters:
request- the AWS request to execute.requestTimeout- the number of milliseconds the client should wait for a response from the server before failing with an error.resultDecoder- theDecoderto use to decode the result into a value.- Returns:
- the decoded result value.
-
execute
public <ResultT> ResultT execute(AwsRequest request, Long requestTimeout, Class<ResultT> resultClass)
Executes the AWS request, and decodes the result into an instance of the specified type. The response will be decoded using the codec registry specified when the app client was configured. If no codec registry was configured, a default codec registry will be used. The default codec registry supports the mappings specified here- Specified by:
executein interfaceAwsServiceClient- Type Parameters:
ResultT- the type into which the response will be decoded.- Parameters:
request- the AWS request to execute.requestTimeout- the number of milliseconds the client should wait for a response from the server before failing with an error.resultClass- the class that the result should be decoded as.- Returns:
- the decoded result value.
-
execute
public <ResultT> ResultT execute(AwsRequest request, Long requestTimeout, Class<ResultT> resultClass, CodecRegistry codecRegistry)
Executes the AWS request, and decodes the result into an instance of the specified type. The response will be decoded using the codec registry given.- Specified by:
executein interfaceAwsServiceClient- Type Parameters:
ResultT- the type into which the response will be decoded.- Parameters:
request- the AWS request to execute.requestTimeout- the number of milliseconds the client should wait for a response from the server before failing with an error.resultClass- the class that the result should be decoded as.codecRegistry- the codec registry used for de/serialization of the function call.- Returns:
- the decoded result value.
-
getCodecRegistry
public CodecRegistry getCodecRegistry()
Get the codec registry that will be used to decode responses when a codec registry.- Specified by:
getCodecRegistryin interfaceAwsServiceClient- Returns:
- the
CodecRegistry
-
withCodecRegistry
public AwsServiceClient withCodecRegistry(CodecRegistry codecRegistry)
Create a new AwsServiceClient instance with a different codec registry.- Specified by:
withCodecRegistryin interfaceAwsServiceClient- Parameters:
codecRegistry- the newCodecRegistryfor the client.- Returns:
- a new AwsServiceClient instance with the different codec registry
-
-