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

io.vertx.groovy.core.Vertx_GroovyExtension Maven / Gradle / Ivy

package io.vertx.groovy.core;
public class Vertx_GroovyExtension {
  public static io.vertx.core.net.NetServer createNetServer(io.vertx.core.Vertx j_receiver, java.util.Map options) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.createNetServer(options != null ? new io.vertx.core.net.NetServerOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null));
  }
  public static io.vertx.core.net.NetClient createNetClient(io.vertx.core.Vertx j_receiver, java.util.Map options) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.createNetClient(options != null ? new io.vertx.core.net.NetClientOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null));
  }
  public static io.vertx.core.http.HttpServer createHttpServer(io.vertx.core.Vertx j_receiver, java.util.Map options) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.createHttpServer(options != null ? new io.vertx.core.http.HttpServerOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null));
  }
  public static io.vertx.core.http.HttpClient createHttpClient(io.vertx.core.Vertx j_receiver, java.util.Map options) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.createHttpClient(options != null ? new io.vertx.core.http.HttpClientOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null));
  }
  public static io.vertx.core.datagram.DatagramSocket createDatagramSocket(io.vertx.core.Vertx j_receiver, java.util.Map options) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.createDatagramSocket(options != null ? new io.vertx.core.datagram.DatagramSocketOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null));
  }
  public static io.vertx.core.dns.DnsClient createDnsClient(io.vertx.core.Vertx j_receiver, java.util.Map options) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.createDnsClient(options != null ? new io.vertx.core.dns.DnsClientOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null));
  }
  public static void deployVerticle(io.vertx.core.Vertx j_receiver, java.lang.String name, java.util.Map options) {
    j_receiver.deployVerticle(name,
      options != null ? new io.vertx.core.DeploymentOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null);
  }
  public static void deployVerticle(io.vertx.core.Vertx j_receiver, java.lang.String name, java.util.Map options, io.vertx.core.Handler> completionHandler) {
    j_receiver.deployVerticle(name,
      options != null ? new io.vertx.core.DeploymentOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null,
      completionHandler != null ? new io.vertx.core.Handler>() {
      public void handle(io.vertx.core.AsyncResult ar) {
        completionHandler.handle(ar.map(event -> event));
      }
    } : null);
  }
  public static void executeBlocking(io.vertx.core.Vertx j_receiver, io.vertx.core.Handler> blockingCodeHandler, boolean ordered, io.vertx.core.Handler> resultHandler) {
    j_receiver.executeBlocking(blockingCodeHandler != null ? event -> blockingCodeHandler.handle(io.vertx.core.impl.ConversionHelper.fromObject(event)) : null,
      ordered,
      resultHandler != null ? new io.vertx.core.Handler>() {
      public void handle(io.vertx.core.AsyncResult ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null);
  }
  public static void executeBlocking(io.vertx.core.Vertx j_receiver, io.vertx.core.Handler> blockingCodeHandler, io.vertx.core.Handler> resultHandler) {
    j_receiver.executeBlocking(blockingCodeHandler != null ? event -> blockingCodeHandler.handle(io.vertx.core.impl.ConversionHelper.fromObject(event)) : null,
      resultHandler != null ? new io.vertx.core.Handler>() {
      public void handle(io.vertx.core.AsyncResult ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy