public class AsynchronousHttpClientExample {
public static void main(String[] args) {
AsynchronousHttpClient client = new AsynchronousHttpClient();
client.fetch("http://sunet.se/",
new AsyncResult<Response>() {
public void onFailure(Throwable caught) { out.println("exception:\n" + caught);}
public void onSuccess(Response response) { out.println("http resonse:\n" + response);}
}
);