Java 类com.amazonaws.http.JsonResponseHandler 实例源码

项目:ibm-cos-sdk-java    文件:SdkStructuredJsonFactoryImpl.java   
@Override
public <T> JsonResponseHandler<T> createResponseHandler(JsonOperationMetadata operationMetadata,
                                                        Unmarshaller<T, JsonUnmarshallerContext> responseUnmarshaller) {
    return new JsonResponseHandler(responseUnmarshaller, unmarshallers, customTypeMarshallers, jsonFactory,
                                   operationMetadata.isHasStreamingSuccessResponse(),
                                   operationMetadata.isPayloadJson());
}
项目:ivona-speechcloud-sdk-java    文件:IvonaSpeechCloudClient.java   
@Override
public ListVoicesResult listVoices(ListVoicesRequest listVoicesRequest) throws AmazonServiceException,
        AmazonClientException {

    ExecutionContext executionContext = createExecutionContext(listVoicesRequest);
    Request<ListVoicesRequest> request = ListVoicesRequestMarshallerFactory.getMarshaller(
            listVoicesRequest.getMethodType()).marshall(listVoicesRequest);
    Unmarshaller<ListVoicesResult, JsonUnmarshallerContext> unmarshaller = new ListVoicesResultJsonUnmarshaller();
    JsonResponseHandler<ListVoicesResult> responseHandler =
            new JsonResponseHandler<ListVoicesResult>(unmarshaller);
    Response<ListVoicesResult> response = invoke(request, responseHandler, executionContext);
    return response.getAwsResponse();
}
项目:ivona-speechcloud-sdk-java    文件:IvonaSpeechCloudClient.java   
@Override
public void deleteLexicon(DeleteLexiconRequest deleteLexiconRequest)
        throws AmazonServiceException, AmazonClientException {

    ExecutionContext executionContext = createExecutionContext(deleteLexiconRequest);
    DeleteLexiconRequestMarshaller marshaller = new DeleteLexiconPostRequestMarshaller();
    Request<DeleteLexiconRequest> request = marshaller.marshall(deleteLexiconRequest);
    JsonResponseHandler<Void> responseHandler = new JsonResponseHandler<Void>(null);

    invoke(request, responseHandler, executionContext);
}
项目:ivona-speechcloud-sdk-java    文件:IvonaSpeechCloudClient.java   
@Override
public GetLexiconResult getLexicon(GetLexiconRequest getLexiconRequest)
        throws AmazonServiceException, AmazonClientException {

    ExecutionContext executionContext = createExecutionContext(getLexiconRequest);
    GetLexiconRequestMarshaller marshaller = new GetLexiconPostRequestMarshaller();
    Request<GetLexiconRequest> request = marshaller.marshall(getLexiconRequest);
    Unmarshaller<GetLexiconResult, JsonUnmarshallerContext> unmarshaller = new GetLexiconResultJsonUnmarshaller();
    JsonResponseHandler<GetLexiconResult> responseHandler = new JsonResponseHandler<GetLexiconResult>(unmarshaller);

    Response<GetLexiconResult> response = invoke(request, responseHandler, executionContext);
    return response.getAwsResponse();
}
项目:ivona-speechcloud-sdk-java    文件:IvonaSpeechCloudClient.java   
@Override
public ListLexiconsResult listLexicons() {
    ListLexiconsRequest listLexiconsRequest = new ListLexiconsRequest();
    ExecutionContext executionContext = createExecutionContext(listLexiconsRequest);
    ListLexiconsRequestMarshaller marshaller = new ListLexiconsPostRequestMarshaller();
    Request<ListLexiconsRequest> request = marshaller.marshall(listLexiconsRequest);
    Unmarshaller<ListLexiconsResult, JsonUnmarshallerContext> unmarshaller =
            new ListLexiconsResultJsonUnmarshaller();
    JsonResponseHandler<ListLexiconsResult> responseHandler =
            new JsonResponseHandler<ListLexiconsResult>(unmarshaller);

    Response<ListLexiconsResult> response = invoke(request, responseHandler, executionContext);
    return response.getAwsResponse();
}
项目:ivona-speechcloud-sdk-java    文件:IvonaSpeechCloudClient.java   
@Override
public void putLexicon(PutLexiconRequest putLexiconRequest)
        throws AmazonServiceException, AmazonClientException {

    ExecutionContext executionContext = createExecutionContext(putLexiconRequest);
    PutLexiconRequestMarshaller marshaller = new PutLexiconPostRequestMarshaller();
    Request<PutLexiconRequest> request = marshaller.marshall(putLexiconRequest);
    JsonResponseHandler<Void> responseHandler = new JsonResponseHandler<Void>(null);

    invoke(request, responseHandler, executionContext);
}
项目:aws-hal-client-java    文件:HalClient.java   
HalResource getHalResource(String resourcePath) {
    JsonResponseHandler<HalResource> responseHandler = new JsonResponseHandler<>(HalJsonResourceUnmarshaller.getInstance());

    return invoke(GET, resourcePath, null, responseHandler);
}
项目:ibm-cos-sdk-java    文件:SdkStructuredJsonFactory.java   
/**
 * Returns the response handler to be used for handling a successfull response.
 *
 * @param operationMetadata Additional context information about an operation to create the
 *                          appropriate response handler.
 */
<T> JsonResponseHandler<T> createResponseHandler(JsonOperationMetadata operationMetadata,
                                                 Unmarshaller<T, JsonUnmarshallerContext> responseUnmarshaller);