Back to project page droidcon-android-espresso.
The source code is released under:
Apache License
If you think the Android project droidcon-android-espresso listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.xrigau.droidcon.core.task; /*from w w w .ja v a2 s. c o m*/ import com.xrigau.droidcon.core.service.Services; import retrofit.RestAdapter; import retrofit.client.Client; public class TaskExecutor { private static final String API_URL = "http://node-hnapi.herokuapp.com"; private final Client client; public TaskExecutor(Client client) { this.client = client; } public <T> T execute(Task<T> task) { RestAdapter restAdapter = new RestAdapter.Builder().setClient(client).setServer(API_URL).build(); return task.execute(restAdapter.create(Services.class)); } }