private static final Logger LOG = LoggerFactory.getLogger(AsynchronousClient.class);
public static void main(String[] args) {
// Build the Retrofit REST adaptor pointing to the URL specified
// with a ThrottlingInterceptor allowing only 1 request per second
RestAdapter restAdapter = new RestAdapter.Builder()
.setRequestInterceptor(new ThrottlingInterceptor(1000L))
.setServer(API_URL)
.build();
// Create an instance of our InterestingApi interface.
InterestingApi synchronousApi = restAdapter.create(InterestingApi.class);
// Create an instance of our AsynchronousApi interface.
AsynchronousApi asyncApi = restAdapter.create(AsynchronousApi.class);
for(int i = 0; i < 10; i++)
LOG.info("synchronousApi " + synchronousApi.getWithPath(Integer.toString(i)));
for(int i = 0; i < 10; i++)