public class RandomIdHandler extends RequestHandler2
| Constructor and Description |
|---|
RandomIdHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterError(Request<?> request,
Response<?> response,
Exception e)
Runs any additional processing logic on a request after it has failed.
|
void |
afterResponse(Request<?> 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.
|
void |
beforeRequest(Request<?> request)
Runs any additional processing logic on the specified request (before it is executed by the
client runtime).
|
adapt, afterAttempt, beforeAttempt, beforeExecution, beforeUnmarshallingpublic AmazonWebServiceRequest beforeMarshalling(AmazonWebServiceRequest request)
IRequestHandler2Warning: Modifications to this message 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. For this
reason, we recommend that you only modify the request in the IRequestHandler2.beforeRequest(Request)
method. If you require data that is not available in that method, you should create a
AmazonWebServiceRequest.clone() of the request (which performs a deep copy of the
handler context map), add any context data you require in the IRequestHandler2.beforeRequest(Request)
method using AmazonWebServiceRequest.addHandlerContext(HandlerContextKey, Object), and
return your cloned message from this method. You can then extract that data for use in the
request using HandlerContextAware.getHandlerContext(HandlerContextKey).
beforeMarshalling in interface IRequestHandler2beforeMarshalling in class RequestHandler2request - the request passed in by the userpublic void beforeRequest(Request<?> request)
IRequestHandler2beforeRequest in interface IRequestHandler2beforeRequest in class RequestHandler2request - The low level request being processed.public void afterResponse(Request<?> request, Response<?> response)
IRequestHandler2afterResponse in interface IRequestHandler2afterResponse in class RequestHandler2request - The low level request being processed.response - The response generated from the specified request.public void afterError(Request<?> request, Response<?> response, Exception e)
IRequestHandler2afterError in interface IRequestHandler2afterError in class RequestHandler2request - 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.