@Test public void testThatTaskSubmittedOnVertxEventLoopAreExecutedOnThisEventLoop(TestContext tc) { Async async = tc.async(); vertx.runOnContext(any -> { final Context context = Vertx.currentContext(); final Promise.DefaultPromise<String> promise = new Promise.DefaultPromise<>(); promise.onComplete(ScalaUtils.toFunction1(v -> { tc.assertEquals(context, Vertx.currentContext()); async.complete(); }), VertxEventLoopExecutionContext.create(vertx)); promise.complete(new Success<>("hello")); }); }
public static ExecutionContext create(Vertx vertx) { return new VertxEventLoopExecutionContext(vertx); }
VertxEventLoopExecutionContext implements ExecutionContext { public static ExecutionContext create(Vertx vertx) { return new VertxEventLoopExecutionContext(vertx); } }
VertxEventLoopExecutionContext implements ExecutionContext { public static ExecutionContext create(Vertx vertx) { return new VertxEventLoopExecutionContext(vertx); } private  VertxEventLoopExecutionContext(Vertx vertx); }
VertxEventLoopExecutionContext implements ExecutionContext { public static ExecutionContext create(Vertx vertx) { return new VertxEventLoopExecutionContext(vertx); } private  VertxEventLoopExecutionContext(Vertx vertx); static ExecutionContext create(Vertx vertx); @Override void execute(Runnable runnable); @Override void reportFailure(Throwable cause); @Override ExecutionContext prepare(); }
VertxEventLoopExecutionContext implements ExecutionContext { public static ExecutionContext create(Vertx vertx) { return new VertxEventLoopExecutionContext(vertx); } private  VertxEventLoopExecutionContext(Vertx vertx); static ExecutionContext create(Vertx vertx); @Override void execute(Runnable runnable); @Override void reportFailure(Throwable cause); @Override ExecutionContext prepare();  }