IRequestHandler
AcceptJsonRequestHandler
, AcceptJsonRequestHandler
, AcceptJsonRequestHandler
, CopyDbSnapshotPresignHandler
, CreateBucketRequestHandler
, CreateDbInstanceReadReplicaPresignHandler
, DecodeUrlEncodedResponseRequestHandler
, EC2RequestHandler
, EndpointAddressRequestHandler
, GeneratePreSignUrlRequestHandler
, GlacierRequestHandler
, MessageMD5ChecksumHandler
, PredictEndpointHandler
, QueueUrlHandler
, RandomIdHandler
, Route53IdRequestHandler
, SqsRequestHandler
, SwitchToPostHandler
, TimestampFormatRequestHandler
public abstract class RequestHandler extends Object implements IRequestHandler
Constructor | Description |
---|---|
RequestHandler() |
Modifier and Type | Method | Description |
---|---|---|
void |
afterError(SdkHttpFullRequest request,
Response<?> response,
Exception e) |
Runs any additional processing logic on a request after it has failed.
|
void |
afterResponse(SdkHttpFullRequest request,
Response<?> response) |
Runs any additional processing logic on the specified request (after is has been executed by
the client runtime).
|
AmazonWebServiceRequest |
beforeMarshalling(AmazonWebServiceRequest request) |
Runs any additional processing logic on the specified request object before it is marshaled
into an HTTP request.
|
SdkHttpFullRequest |
beforeRequest(SdkHttpFullRequest request) |
Runs any additional processing logic on the specified request (before it is executed by the
client runtime).
|
HttpResponse |
beforeUnmarshalling(SdkHttpFullRequest request,
HttpResponse httpResponse) |
Runs any additional processing logic on the specified response before it's unmarshalled.
|
public AmazonWebServiceRequest beforeMarshalling(AmazonWebServiceRequest request)
IRequestHandler
If you're going to modify the request, make sure to clone it first, modify the clone, and return it from this method. Otherwise your changes will leak out to the user, who might reuse the request object without realizing that it was modified as part of sending it the first time.
Super big hack: This may not be called if the request is not an AmazonWebServiceRequest.
beforeMarshalling
in interface IRequestHandler
request
- the request passed in by the user.public SdkHttpFullRequest beforeRequest(SdkHttpFullRequest request)
IRequestHandler
beforeRequest
in interface IRequestHandler
request
- The low level request being processed.public HttpResponse beforeUnmarshalling(SdkHttpFullRequest request, HttpResponse httpResponse)
IRequestHandler
AmazonServiceException
beforeUnmarshalling
in interface IRequestHandler
request
- The low level request being processed.httpResponse
- The Raw HTTP response before being unmarshalledHttpResponse
to replace the actual response. May be a mutated version of the
original or a completely new HttpResponse
objectpublic void afterResponse(SdkHttpFullRequest request, Response<?> response)
IRequestHandler
afterResponse
in interface IRequestHandler
request
- The low level request being processed.response
- The response generated from the specified request.public void afterError(SdkHttpFullRequest request, Response<?> response, Exception e)
IRequestHandler
afterError
in interface IRequestHandler
request
- The request that generated an error.response
- the response or null if the failure occurred before the response is made availablee
- The error that resulted from executing the request.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.