Class VertxFutures

java.lang.Object
com.hiddenswitch.spellsource.util.VertxFutures

public final class VertxFutures
extends java.lang.Object
Vert.x future utilities.
  • Method Summary

    Modifier and Type Method Description
    static <T,​ U> java.util.function.BiConsumer<T,​java.lang.Throwable> convertHandler​(io.vertx.core.Handler<io.vertx.core.AsyncResult<U>> handler, java.util.function.Function<T,​U> converter, io.vertx.core.Context context)
    Converts a return value.
    static <T> java.util.function.BiConsumer<T,​java.lang.Throwable> resultHandler​(io.vertx.core.Handler<io.vertx.core.AsyncResult<T>> handler, io.vertx.core.Context context)
    Wraps a Vert.x handler.
    static <T> java.util.function.BiConsumer<T,​java.lang.Throwable> voidHandler​(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> handler, io.vertx.core.Context context)
    Wraps a void Vert.x handler.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • voidHandler

      public static <T> java.util.function.BiConsumer<T,​java.lang.Throwable> voidHandler​(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> handler, io.vertx.core.Context context)
      Wraps a void Vert.x handler.
    • resultHandler

      public static <T> java.util.function.BiConsumer<T,​java.lang.Throwable> resultHandler​(io.vertx.core.Handler<io.vertx.core.AsyncResult<T>> handler, io.vertx.core.Context context)
      Wraps a Vert.x handler.
    • convertHandler

      public static <T,​ U> java.util.function.BiConsumer<T,​java.lang.Throwable> convertHandler​(io.vertx.core.Handler<io.vertx.core.AsyncResult<U>> handler, java.util.function.Function<T,​U> converter, io.vertx.core.Context context)
      Converts a return value.