Hi Amit,

Regarding Java, I don't have a sample program to do this, but the key point 
to remember is to make sure you are following the recommendations in our thread 
safety guide for Java 
<https://github.com/googleads/googleads-java-lib/wiki/Thread-Safety>. The 
basic setup would be as follows:

   1. Create a thread pool (ExecutorService 
   
<http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html>
   )
   2. For each *clientCustomerId* (AdWords account), create and submit a 
   new Callable 
   
<http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html#submit(java.util.concurrent.Callable)>
 to 
   the *ExecutorService*. This *Callable* should:
      - Create a new *AdWordsSession* with the *clientCustomerId* set 
      properly.
      - Create a new *ReportDownloader*, passing the *AdWordsSession* created 
      just for that *Callable*.
      - Invoke *downloadReport* on the *ReportDownloader* and process the 
      results in whichever way fits your use case.
      - This will be very similar to *runExample* in the 
DownloadCriteriaReport.java 
      example 
      
<https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201506/reporting/DownloadCriteriaReport.java>
      .
   3. Track the results of each *Callable* returned by 
   *ExecutorService.submit*. Resubmit any failed requests, provided they 
   failed because of transient errors (see Anash's earlier post).
   4. Call ExecutorService.html.shutdown() 
   
<http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html#shutdown()>
 to 
   clean up the thread pool when done.

Cheers,
Josh, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ef114548-625e-465a-ac9b-26f12cc60f84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to