Class ApplyUserAgentStage

  • All Implemented Interfaces:
    MutableRequestToRequestPipeline, RequestPipeline<software.amazon.awssdk.http.SdkHttpFullRequest.Builder,​software.amazon.awssdk.http.SdkHttpFullRequest.Builder>

    public class ApplyUserAgentStage
    extends Object
    implements MutableRequestToRequestPipeline
    A stage for adding the user agent header to the request, after retrieving the current string from execution attributes and adding any additional information.
    • Method Detail

      • resolveClientUserAgent

        public static String resolveClientUserAgent​(String userAgentPrefix,
                                                    String internalUserAgent,
                                                    ClientType clientType,
                                                    software.amazon.awssdk.http.SdkHttpClient syncHttpClient,
                                                    software.amazon.awssdk.http.async.SdkAsyncHttpClient asyncHttpClient,
                                                    RetryPolicy retryPolicy)
      • execute

        public software.amazon.awssdk.http.SdkHttpFullRequest.Builder execute​(software.amazon.awssdk.http.SdkHttpFullRequest.Builder request,
                                                                              RequestExecutionContext context)
                                                                       throws Exception
        Description copied from interface: RequestPipeline
        Execute the pipeline with the given input.
        Specified by:
        execute in interface RequestPipeline<software.amazon.awssdk.http.SdkHttpFullRequest.Builder,​software.amazon.awssdk.http.SdkHttpFullRequest.Builder>
        Parameters:
        request - Input to pipeline.
        context - Context containing both request dependencies, and a container for any mutable state that must be shared between stages.
        Returns:
        Output of pipeline.
        Throws:
        Exception - If any error occurs. This will be thrown out of the pipeline, if exceptions must be handled see RequestPipelineBuilder.wrappedWith(BiFunction).