package io.vertx.groovy.core;
public class Context_GroovyExtension {
  public static <T>void executeBlocking(io.vertx.core.Context j_receiver, io.vertx.core.Handler<io.vertx.core.Promise<java.lang.Object>> blockingCodeHandler, boolean ordered, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Object>> 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<io.vertx.core.AsyncResult<java.lang.Object>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Object> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null);
  }
  public static <T>void executeBlocking(io.vertx.core.Context j_receiver, io.vertx.core.Handler<io.vertx.core.Promise<java.lang.Object>> blockingCodeHandler, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Object>> resultHandler) {
    j_receiver.executeBlocking(blockingCodeHandler != null ? event -> blockingCodeHandler.handle(io.vertx.core.impl.ConversionHelper.fromObject(event)) : null,
      resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Object>>() {
      public void handle(io.vertx.core.AsyncResult<java.lang.Object> ar) {
        resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
      }
    } : null);
  }
  public static java.util.Map<String, Object> config(io.vertx.core.Context j_receiver) {
    return io.vertx.core.impl.ConversionHelper.fromJsonObject(j_receiver.config());
  }
  public static <T>java.lang.Object get(io.vertx.core.Context j_receiver, java.lang.String key) {
    return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.get(key));
  }
  public static void put(io.vertx.core.Context j_receiver, java.lang.String key, java.lang.Object value) {
    j_receiver.put(key,
      io.vertx.core.impl.ConversionHelper.toObject(value));
  }
}