List of usage examples for twitter4j UserStreamListener onStatus
void onStatus(Status status);
From source file:com.freshdigitable.udonroad.util.TwitterResponseMock.java
License:Apache License
public static void receiveStatuses(final UserStreamListener listener, Status... statuses) throws Exception { Observable.just(Arrays.asList(statuses)).flatMapIterable(new Func1<List<Status>, Iterable<Status>>() { @Override// w w w.jav a 2s. c o m public Iterable<Status> call(List<Status> statuses) { return statuses; } }).observeOn(Schedulers.io()).subscribe(new Action1<Status>() { @Override public void call(Status status) { listener.onStatus(status); } }); }