Class AmazonWebServicesClientProxy

  • All Implemented Interfaces:
    CallChain

    public class AmazonWebServicesClientProxy
    extends Object
    implements CallChain
    This implements the proxying mechanism to inject appropriate scoped credentials into a service call when making Amazon Webservice calls.
    See Also:
    CallChain, ProxyClient
    • Field Detail

      • HTTP_STATUS_NETWORK_AUTHN_REQUIRED

        public static final int HTTP_STATUS_NETWORK_AUTHN_REQUIRED
        See Also:
        Constant Field Values
    • Method Detail

      • newProxy

        public <ClientT> ProxyClient<ClientT> newProxy​(@Nonnull
                                                       Supplier<ClientT> client)
      • newInitiator

        public <ClientT,​ModelT,​CallbackT extends StdCallbackContextCallChain.Initiator<ClientT,​ModelT,​CallbackT> newInitiator​(ProxyClient<ClientT> client,
                                                                                                                                                        ModelT model,
                                                                                                                                                        CallbackT context)
        Description copied from interface: CallChain
        factory method can created an CallChain.Initiator
        Specified by:
        newInitiator in interface CallChain
        Type Parameters:
        ClientT - Actual client e.g. KinesisClient.
        ModelT - The type (POJO) of Resource model.
        CallbackT - , callback context the extends StdCallbackContext
        Parameters:
        client - AWS Service Client. Recommend using Sync client as the framework handles interleaving as needed.
        model - the resource desired state model, usually
        context - callback context that tracks all outbound API calls
        Returns:
        an instance of the CallChain.Initiator
      • initiate

        public <ClientT,​ModelT,​CallbackT extends StdCallbackContextCallChain.RequestMaker<ClientT,​ModelT,​CallbackT> initiate​(String callGraph,
                                                                                                                                                       ProxyClient<ClientT> client,
                                                                                                                                                       ModelT model,
                                                                                                                                                       CallbackT cxt)
        Description copied from interface: CallChain
        Each service call must be first initiated. Every call is provided a separate name called call graph. This is eseential from both a tracing perspective as well as StdCallbackContext automated replay capabilities.
        Specified by:
        initiate in interface CallChain
        Type Parameters:
        ClientT - Actual client e.g. KinesisClient.
        ModelT - The type (POJO) of Resource model.
        CallbackT - , callback context the extends StdCallbackContext
        Parameters:
        callGraph - , the name of the service operation this call graph is about.
        client - , actual client needed to make the call wrapped inside ProxyClient to support injection of scoped credentials
        model - , the actual resource model that defines the shape for setting up this resource type.
        cxt - , Callback context used for supporting replay and dedupe capabilities.
        Returns:
        Provides the next logical set in the fluent API.
      • getRemainingTimeInMillis

        public final long getRemainingTimeInMillis()
      • injectCredentialsAndInvoke

        public <RequestT extends com.amazonaws.AmazonWebServiceRequest,​ResultT extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata>> ResultT injectCredentialsAndInvoke​(RequestT request,
                                                                                                                                                                                                      Function<RequestT,​ResultT> requestFunction)
      • injectCredentialsAndInvokeV2

        public <RequestT extends software.amazon.awssdk.awscore.AwsRequest,​ResultT extends software.amazon.awssdk.awscore.AwsResponse> ResultT injectCredentialsAndInvokeV2​(RequestT request,
                                                                                                                                                                                  Function<RequestT,​ResultT> requestFunction)
      • injectCredentialsAndInvokeV2Async

        public <RequestT extends software.amazon.awssdk.awscore.AwsRequest,​ResultT extends software.amazon.awssdk.awscore.AwsResponse> CompletableFuture<ResultT> injectCredentialsAndInvokeV2Async​(RequestT request,
                                                                                                                                                                                                          Function<RequestT,​CompletableFuture<ResultT>> requestFunction)
      • injectCredentialsAndInvokeIterableV2

        public <RequestT extends software.amazon.awssdk.awscore.AwsRequest,​ResultT extends software.amazon.awssdk.awscore.AwsResponse,​IterableT extends software.amazon.awssdk.core.pagination.sync.SdkIterable<ResultT>> IterableT injectCredentialsAndInvokeIterableV2​(RequestT request,
                                                                                                                                                                                                                                                                                     Function<RequestT,​IterableT> requestFunction)