public static SearchFacesByImageResultJsonUnmarshaller getInstance() { if (instance == null) instance = new SearchFacesByImageResultJsonUnmarshaller(); return instance; } }
@SdkInternalApi final SearchFacesByImageResult executeSearchFacesByImage(SearchFacesByImageRequest searchFacesByImageRequest) { ExecutionContext executionContext = createExecutionContext(searchFacesByImageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<SearchFacesByImageRequest> request = null; Response<SearchFacesByImageResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new SearchFacesByImageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(searchFacesByImageRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Rekognition"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SearchFacesByImage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<SearchFacesByImageResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new SearchFacesByImageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } }
public static SearchFacesByImageResultJsonUnmarshaller getInstance() { if (instance == null) instance = new SearchFacesByImageResultJsonUnmarshaller(); return instance; } }
awsRequestMetrics.endEvent(Field.RequestMarshallTime); Unmarshaller<SearchFacesByImageResult, JsonUnmarshallerContext> unmarshaller = new SearchFacesByImageResultJsonUnmarshaller(); JsonResponseHandler<SearchFacesByImageResult> responseHandler = new JsonResponseHandler<SearchFacesByImageResult>( unmarshaller);