Back to project page libgdx-chat-example.
The source code is released under:
Apache License
If you think the Android project libgdx-chat-example 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 org.stofkat.chat.http.dispatch; //w ww.ja v a 2 s. c om import org.stofkat.chat.common.ClientInterface; import org.stofkat.chat.common.results.Result; public class AsyncCallbackHandler<R extends Result> implements AsyncCallback<R> { private ClientInterface client; public AsyncCallbackHandler(ClientInterface client) { this.client = client; } @Override public void onFailure(Throwable caught) { caught.printStackTrace(); // TODO Log the exception and show an error to the user. client.close(); } @Override public void onSuccess(R result) { result.processResult(client); } }