Created
April 1, 2017 19:07
-
-
Save sauravvishal8797/3a5324d40de97173ce621412557e1a29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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