List of usage examples for twitter4j UserStreamListener onDeletionNotice
void onDeletionNotice(StatusDeletionNotice statusDeletionNotice);
From source file:com.freshdigitable.udonroad.util.TwitterResponseMock.java
License:Apache License
public static void receiveDeletionNotice(final UserStreamListener listener, Status... statuses) throws Exception { Observable.just(Arrays.asList(statuses)).flatMapIterable(new Func1<List<Status>, Iterable<Status>>() { @Override/*w ww .ja va 2s .c om*/ public Iterable<Status> call(List<Status> statuses) { return statuses; } }).map(new Func1<Status, StatusDeletionNotice>() { @Override public StatusDeletionNotice call(Status status) { return createDeletionNotice(status); } }).observeOn(Schedulers.io()).subscribe(new Action1<StatusDeletionNotice>() { @Override public void call(StatusDeletionNotice statusDeletionNotice) { listener.onDeletionNotice(statusDeletionNotice); } }); }