Examples of RxVertx


Examples of io.vertx.rxcore.java.RxVertx

  /** Test Timer */
  @Test
  public void testTimer() {

    RxVertx rx=new RxVertx(vertx);

    final long startTime=System.currentTimeMillis();
    final Context initCtx=vertx.currentContext();

    Observable.zip(
      Observable.from(Arrays.asList(1,2,3,4,5,6,7,8,9,10)),
      Observable.timer(100, 100, TimeUnit.MILLISECONDS, rx.contextScheduler()),
      new Func2<Integer, Long, Integer>() {
        public Integer call(Integer value, Long timer) {
          return value;
        }
      })
View Full Code Here

Examples of io.vertx.rxcore.java.RxVertx

  /** Test Buffer */
  @Test
  public void testBuffer() {

    RxVertx rx=new RxVertx(vertx);

    final long startTime=System.currentTimeMillis();
    final Context initCtx=vertx.currentContext();

    Observable
      .timer(10, 10, TimeUnit.MILLISECONDS, rx.contextScheduler())
      .buffer(100,TimeUnit.MILLISECONDS,rx.contextScheduler())
      .take(10)
      .subscribe(new Observer<List<Long>>() {

        private int eventCount=0;

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.