Skip to content

Instantly share code, notes, and snippets.

@bangarharshit
Created August 20, 2016 00:45
Show Gist options
  • Save bangarharshit/089bd79dfdb6e3d6c2c8478adecf3344 to your computer and use it in GitHub Desktop.
Save bangarharshit/089bd79dfdb6e3d6c2c8478adecf3344 to your computer and use it in GitHub Desktop.
import rx.Subscriber;
/**
* Created by harshitbangar on 19/08/16.
*/
public class MainClass {
public static void main(String[] args) {
QueueLibraryManager queueLibraryManager = new QueueLibraryManager();
queueLibraryManager.addToQueue("arbit").subscribe(new TestSubscriber());
queueLibraryManager.addToQueue("bdsds").subscribe(new TestSubscriber());
queueLibraryManager.addToQueue("arbidsdst").subscribe(new TestSubscriber());
queueLibraryManager.addToQueue("arbitdsdsd").subscribe(new TestSubscriber());
}
public static class TestSubscriber extends Subscriber<String> {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable throwable) {
}
@Override
public void onNext(String o) {
System.out.println(o);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment