@Test public void testItemLookupAsync01() throws Exception { String asin = "489471499X"; ItemLookupRequest request = new ItemLookupRequest(); request.getItemId().add(asin); request.getResponseGroup().add("Small"); Response<ItemLookupResponse> res = requester.itemLookupAsync(request); ItemLookupResponse response = res.get(); assertNotNull(response); assertNotNull(response.getItems()); assertTrue(response.getItems().size() == 1); assertNotNull(response.getItems().get(0).getItem()); assertTrue(response.getItems().get(0).getItem().size() == 1); Item item = response.getItems().get(0).getItem().get(0); assertEquals(asin, item.getASIN()); assertNotNull(item.getItemAttributes()); }
@Override public Response<ItemLookupResponse> itemLookupAsync( ItemLookupRequest request) throws ExecutionException, InterruptedException { AWSECommerceServicePortType port = preparePort(); ItemLookup itemLookup = prepareItemLookup(request); Response<ItemLookupResponse> response = port .itemLookupAsync(itemLookup); return response; }
AwsApaRequesterImpl implements AwsApaRequester { @Override public Response<ItemLookupResponse> itemLookupAsync( ItemLookupRequest request) throws ExecutionException, InterruptedException { AWSECommerceServicePortType port = preparePort(); ItemLookup itemLookup = prepareItemLookup(request); Response<ItemLookupResponse> response = port .itemLookupAsync(itemLookup); return response; } }
AwsApaRequesterImpl implements AwsApaRequester { @Override public Response<ItemLookupResponse> itemLookupAsync( ItemLookupRequest request) throws ExecutionException, InterruptedException { AWSECommerceServicePortType port = preparePort(); ItemLookup itemLookup = prepareItemLookup(request); Response<ItemLookupResponse> response = port .itemLookupAsync(itemLookup); return response; } AwsApaRequesterImpl();  AwsApaRequesterImpl(String endpoint, String accessKeyId,
                               String secretAccessKey, String associateTag); }
AwsApaRequesterImpl implements AwsApaRequester { @Override public Response<ItemLookupResponse> itemLookupAsync( ItemLookupRequest request) throws ExecutionException, InterruptedException { AWSECommerceServicePortType port = preparePort(); ItemLookup itemLookup = prepareItemLookup(request); Response<ItemLookupResponse> response = port .itemLookupAsync(itemLookup); return response; } AwsApaRequesterImpl();  AwsApaRequesterImpl(String endpoint, String accessKeyId,
                               String secretAccessKey, String associateTag); @Override ItemSearchResponse itemSearch(ItemSearchRequest request); @Override Response<ItemSearchResponse> itemSearchAsync(
            ItemSearchRequest request); T invokeWithRetry(WebServiceInvoker<T> invoker); @Override ItemLookupResponse itemLookup(ItemLookupRequest request); @Override Response<ItemLookupResponse> itemLookupAsync(
            ItemLookupRequest request); T getResponseWithRetry(final Response<T> res); int getRetryCount(); void setRetryCount(int retryCount); long getRetryInterval(); void setRetryInterval(long retryInterval); }
AwsApaRequesterImpl implements AwsApaRequester { @Override public Response<ItemLookupResponse> itemLookupAsync( ItemLookupRequest request) throws ExecutionException, InterruptedException { AWSECommerceServicePortType port = preparePort(); ItemLookup itemLookup = prepareItemLookup(request); Response<ItemLookupResponse> response = port .itemLookupAsync(itemLookup); return response; } AwsApaRequesterImpl();  AwsApaRequesterImpl(String endpoint, String accessKeyId,
                               String secretAccessKey, String associateTag); @Override ItemSearchResponse itemSearch(ItemSearchRequest request); @Override Response<ItemSearchResponse> itemSearchAsync(
            ItemSearchRequest request); T invokeWithRetry(WebServiceInvoker<T> invoker); @Override ItemLookupResponse itemLookup(ItemLookupRequest request); @Override Response<ItemLookupResponse> itemLookupAsync(
            ItemLookupRequest request); T getResponseWithRetry(final Response<T> res); int getRetryCount(); void setRetryCount(int retryCount); long getRetryInterval(); void setRetryInterval(long retryInterval);  }