com.github.charlemaznable.bunny.plugin.elf.VertxElf Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bunny-plugin Show documentation
Show all versions of bunny-plugin Show documentation
Bunny rabbits will skip hand-in-hand with baby lambs across sunny green meadows.
The newest version!
package com.github.charlemaznable.bunny.plugin.elf;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import java.util.Map;
public final class VertxElf {
private VertxElf() {
throw new UnsupportedOperationException();
}
public static void executeBlocking(
Map contextMap,
Handler> blockingCodeHandler,
Handler> resultHandler) {
Vertx.currentContext().executeBlocking(block -> {
try {
MtcpElf.preHandle(contextMap);
blockingCodeHandler.handle(block);
} catch (Exception e) {
block.fail(e);
} finally {
MtcpElf.afterCompletion();
}
}, false, resultHandler);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy