Skip to content

Instantly share code, notes, and snippets.

@sauravvishal8797
Created April 1, 2017 19:07
Show Gist options
  • Save sauravvishal8797/3a5324d40de97173ce621412557e1a29 to your computer and use it in GitHub Desktop.
Save sauravvishal8797/3a5324d40de97173ce621412557e1a29 to your computer and use it in GitHub Desktop.
PipeManager.config("alerts", RestfulPipeConfiguration.class)
.withUrl(new URL("http://livingontheedge.hawkular.org/"))
.forClass(Developer.class);
LoaderPipe<Developer> pipe = PipeManager.get("alerts", activityInstance);
pipe.reset();
pipe.read(new ReadDevelopersActivityCallback());
public static class ReadDevelopersActivityCallback
extends AbstractActivityCallback<List<Developer>> {
@Override
public void onSuccess(List<Developer> devs) {
// Here you have a list of alerts active which can be sorted according to
Time including hours, months, year etc.
}
@Override
public void onFailure(Exception e) {
// Oops! Something is wrong. Probably your internet is down :P
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment