Exemplo n.º 1
0
 private <T> void publishError(final Observer<T> observer, long delay, final Throwable error) {
   scheduler.schedule(
       new Action1<Inner>() {
         @Override
         public void call(Inner inner) {
           observer.onError(error);
         }
       },
       delay,
       TimeUnit.MILLISECONDS);
 }
Exemplo n.º 2
0
 private <T> void publishNext(final Observer<T> observer, long delay, final T value) {
   scheduler.schedule(
       new Action1<Inner>() {
         @Override
         public void call(Inner inner) {
           observer.onNext(value);
         }
       },
       delay,
       TimeUnit.MILLISECONDS);
 }
Exemplo n.º 3
0
 private <T> void publishCompleted(final Observer<T> observer, long delay) {
   scheduler.schedule(
       new Action1<Inner>() {
         @Override
         public void call(Inner inner) {
           observer.onCompleted();
         }
       },
       delay,
       TimeUnit.MILLISECONDS);
 }