Last active
February 5, 2017 23:24
-
-
Save feresr/fd221c513e8fc515d0257a679d812c36 to your computer and use it in GitHub Desktop.
RxRelayAwesome
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
public void execute() { | |
//doesn't actually execute anything just yet... just creates the observable | |
observable = endpoints.getJoke().doOnNext(joke -> storage.save(joke)); | |
} | |
public Subscription subscribe(Subscriber<Joke> subscriber) { | |
return observable.subscribe(subscriber); | |
} | |
public final void unsubscribe(Subscription subscription) { } //unsubscribe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment