/** * @return a new HandlerAfterAttemptContext object */ public HandlerAfterAttemptContext build() { return new HandlerAfterAttemptContext(request, response, exception); } }
ApiCallAttemptMonitoringEvent event) { TimingInfo timingInfo = metrics == null ? null : metrics.getTimingInfo(); Response<?> response = context.getResponse(); Integer statusCode = null; String xAmznRequestId = null; statusCode = response.getHttpResponse().getStatusCode(); requestLatency = calculateRequestLatency(timingInfo); } else if (context.getException() instanceof AmazonServiceException) { responseHeaders = ((AmazonServiceException) context.getException()).getHttpHeaders(); statusCode = extractHttpStatusCode((AmazonServiceException) context.getException()); requestLatency = calculateRequestLatency(timingInfo); .withHttpStatusCode(statusCode) .withRequestLatency(requestLatency); addException(context.getException(), event);
@Override public void afterAttempt(HandlerAfterAttemptContext context) { ApiCallAttemptMonitoringEvent event = generateApiCallAttemptMonitoringEvent(context); context.getRequest().addHandlerContext(LAST_CALL_ATTEMPT, event); handToMonitoringListeners(event); }
private <T> void afterAttempt(HandlerAfterAttemptContext context) throws InterruptedException { for (RequestHandler2 handler2 : requestHandler2s) { handler2.afterAttempt(context); checkInterrupted(context.getResponse()); } }
HandlerAfterAttemptContext afterAttemptContext = HandlerAfterAttemptContext.builder() .withRequest(request) .withResponse(response)
private <T> void afterAttempt(HandlerAfterAttemptContext context) throws InterruptedException { for (RequestHandler2 handler2 : requestHandler2s) { handler2.afterAttempt(context); checkInterrupted(context.getResponse()); } }
HandlerAfterAttemptContext afterAttemptContext = HandlerAfterAttemptContext.builder() .withRequest(request) .withResponse(response)
ApiCallAttemptMonitoringEvent event) { TimingInfo timingInfo = metrics == null ? null : metrics.getTimingInfo(); Response<?> response = context.getResponse(); Integer statusCode = null; String xAmznRequestId = null; statusCode = response.getHttpResponse().getStatusCode(); requestLatency = calculateRequestLatency(timingInfo); } else if (context.getException() instanceof AmazonServiceException) { responseHeaders = ((AmazonServiceException) context.getException()).getHttpHeaders(); statusCode = extractHttpStatusCode((AmazonServiceException) context.getException()); requestLatency = calculateRequestLatency(timingInfo); .withHttpStatusCode(statusCode) .withRequestLatency(requestLatency); addException(context.getException(), event);
/** * @return a new HandlerAfterAttemptContext object */ public HandlerAfterAttemptContext build() { return new HandlerAfterAttemptContext(request, response, exception); } }
private <T> void afterAttempt(HandlerAfterAttemptContext context) throws InterruptedException { for (RequestHandler2 handler2 : requestHandler2s) { handler2.afterAttempt(context); checkInterrupted(context.getResponse()); } }
HandlerAfterAttemptContext afterAttemptContext = HandlerAfterAttemptContext.builder() .withRequest(request) .withResponse(response)
Request<?> request = context.getRequest(); AWSRequestMetrics metrics = context.getRequest().getAWSRequestMetrics();
/** * @return a new HandlerAfterAttemptContext object */ public HandlerAfterAttemptContext build() { return new HandlerAfterAttemptContext(request, response, exception); } }
@Override public void afterAttempt(HandlerAfterAttemptContext context) { ApiCallAttemptMonitoringEvent event = generateApiCallAttemptMonitoringEvent(context); context.getRequest().addHandlerContext(LAST_CALL_ATTEMPT, event); handToMonitoringListeners(event); }
Request<?> request = context.getRequest(); AWSRequestMetrics metrics = context.getRequest().getAWSRequestMetrics();