Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Elrhino
Last active October 27, 2015 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elrhino/a6f5c5ffb22d6f3fab04 to your computer and use it in GitHub Desktop.
Save Elrhino/a6f5c5ffb22d6f3fab04 to your computer and use it in GitHub Desktop.
Code snippets from toaster launcher part 2
@Override
public void onLaunch(String coordinates, String power) {
validateFields(coordinates, power);
dispatch.execute(resource.launch(coordinates, power), new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable throwable) {
// Handle failure
}
@Override
public void onSuccess(Void aVoid) {
// Handle success
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment