Created
January 18, 2017 21:54
-
-
Save jwkidd3/b50158abdd82e5b1c20deebf6829065f 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
class PrintSubscriber extends Subscriber{ | |
private final String name; | |
public PrintSubscriber(String name) { | |
this.name = name; | |
} | |
@Override | |
public void onCompleted() { | |
System.out.println(name + ": Completed"); | |
} | |
@Override | |
public void onError(Throwable e) { | |
System.out.println(name + ": Error: " + e); | |
} | |
@Override | |
public void onNext(Object v) { | |
System.out.println(name + ": " + v); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment