Examples of Action0


Examples of rx.functions.Action0

    }, exp);
  }

  /** Assert that we receive N values */
  public static <T> Subscription assertCount(Observable<T> in, final int max) {
    return assertCountThen(in,new Action0() {
      @Override public void call() {
      }
    },max);
  }
View Full Code Here

Examples of rx.functions.Action0

    },max);
  }

  /** Assert that we receive N values then complete test */
  public static <T> Subscription assertCountThenComplete(Observable<T> in, final int max) {
    return assertCountThen(in,new Action0() {
      @Override public void call() {
        testComplete();
      }
    },max);
  }
View Full Code Here

Examples of rx.functions.Action0

      new Action1<Throwable>() {
        public void call(Throwable t) {
          fail("Error while counting sequence (t="+t+")");
        }
      },
      new Action0() {
        public void call() {
          assertTrue(count.get()==max);
          System.out.println("sequence-complete");
          thenAction.call();
        }
View Full Code Here

Examples of rx.functions.Action0

    assertSequenceThenComplete(in,value);
  }

  /** Assert a sequence then complete test */
  public static <T> void assertSequenceThenComplete(Observable<T> in, final T... exp) {
    assertSequenceThen(in, new Action0() {
      @Override public void call() {
        testComplete();
      }
    }, exp);
  }
View Full Code Here

Examples of rx.functions.Action0

      new Action1<Throwable>() {
        public void call(Throwable t) {
          fail("Error while mapping sequence (t="+t+")");
        }
      },
      new Action0() {
        public void call() {
          assertTrue(expList.isEmpty());
          System.out.println("sequence-complete");
          thenAction.call();
        }
View Full Code Here

Examples of rx.functions.Action0

          if (errMsg!=null)
            assertEquals(errMsg,t.getMessage())
          testComplete();
        }
      },
      new Action0() {
        public void call() {
          fail("unexpected-complete: failure expected");
        }
      });
  }
View Full Code Here

Examples of rx.functions.Action0

            @Override
            public void call(Throwable throwable) {
                errorOnSubscribe.set(throwable);
                latch.countDown();
            }
        }, new Action0() {
            @Override
            public void call() {
                latch.countDown();
            }
        });
View Full Code Here

Examples of rx.functions.Action0

                       
                        @Override
                        public void call(final Subscriber<? super T> o) {
                            // number of children we have running
                            COUNTER_UPDATER.incrementAndGet(GroupBySubscriber.this);
                            o.add(Subscriptions.create(new Action0() {
                               
                                @Override
                                public void call() {
                                    completeInner();
                                }
View Full Code Here

Examples of rx.functions.Action0

                while ((o = buffered.buffer.poll()) != null) {
                    nl.accept(s, o);
                }
                // register real observer for pass-thru ... and drain any further events received on first notification
                state.setObserverRef(new PassThruObserver<T>(s, buffered.buffer, state));
                s.add(Subscriptions.create(new Action0() {
                    @Override
                    public void call() {
                        state.setObserverRef(Subscribers.empty());
                    }
                }));
View Full Code Here

Examples of rx.functions.Action0

        int id;
        synchronized (guard) {
            id = ++index;
        }
        final Token t = new Token(id);
        t1.add(Subscriptions.create(new Action0() {
            @Override
            public void call() {
                disconnect(t);
            }
        }));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.