public class SlowRequestHandler extends RequestHandler2
RequestHandler2 with configurable wait times| Constructor and Description |
|---|
SlowRequestHandler() |
| 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).
|
void |
beforeRequest(Request<?> request)
Runs any additional processing logic on the specified request (before it is executed by the
client runtime).
|
SlowRequestHandler |
withAfterErrorWaitInSeconds(int afterErrorWait) |
SlowRequestHandler |
withAfterResponseWaitInSeconds(int afterResponseWait) |
SlowRequestHandler |
withBeforeRequestWaitInSeconds(int beforeRequestWait) |
adapt, beforeExecution, beforeMarshalling, beforeUnmarshallingpublic 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.public SlowRequestHandler withBeforeRequestWaitInSeconds(int beforeRequestWait)
public SlowRequestHandler withAfterResponseWaitInSeconds(int afterResponseWait)
public SlowRequestHandler withAfterErrorWaitInSeconds(int afterErrorWait)
Copyright © 2017. All rights reserved.