Class CombinedResponseHandler<OutputT>

  • Type Parameters:
    OutputT - Type of successful unmarshalled POJO.
    All Implemented Interfaces:
    HttpResponseHandler<Response<OutputT>>

    public class CombinedResponseHandler<OutputT>
    extends Object
    implements HttpResponseHandler<Response<OutputT>>
    Unmarshalls an HTTP response into either a successful response POJO, or into a (possibly modeled) exception based on the status code of the HTTP response. Returns a wrapper Response object which may contain either the unmarshalled success POJO, or the unmarshalled exception. Can be used with streaming or non-streaming requests.
    • Method Detail

      • handle

        public Response<OutputT> handle​(SdkHttpFullResponse httpResponse,
                                        ExecutionAttributes executionAttributes)
                                 throws Exception
        Description copied from interface: HttpResponseHandler
        Accepts an HTTP response object, and returns an object of type T. Individual implementations may choose to handle the response however they need to, and return any type that they need to.
        Specified by:
        handle in interface HttpResponseHandler<OutputT>
        Parameters:
        httpResponse - The HTTP response to handle, as received from an AWS service.
        executionAttributes - The attributes attached to this particular execution.
        Returns:
        An object of type T, as defined by individual implementations.
        Throws:
        Exception - If any problems are encountered handling the response.