All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vtom.vertx.pipeline.component.timer.VtmTimerCancel Maven / Gradle / Ivy

There is a newer version: 1.1-beta
Show newest version
package io.vtom.vertx.pipeline.component.timer;

import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vtom.vertx.pipeline.step.StepOUT;

public class VtmTimerCancel extends AbstractTimer {

  private long id;

  public VtmTimerCancel(long id) {
    this.id = id;
  }

  @Override
  public StepOUT out() {
    return new VtmTimerOut(stepskips()) {
      @Override
      public void execute(Vertx vertx, Handler> handler) {
        boolean ok = vertx.cancelTimer(id);
        handler.handle(Future.succeededFuture(ok));
      }
    };
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy