package io.vertx.core.impl;
import io.netty.channel.EventLoop;
import io.vertx.core.Handler;
import io.vertx.core.json.JsonObject;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
public class EventLoopContext extends ContextImpl {
private static final Logger log = LoggerFactory.getLogger(EventLoopContext.class);
EventLoopContext(VertxInternal vertx, WorkerPool internalBlockingPool, WorkerPool workerPool, String deploymentID, JsonObject config,
ClassLoader tccl) {
super(vertx, internalBlockingPool, workerPool, deploymentID, config, tccl);
}
public EventLoopContext(VertxInternal vertx, EventLoop eventLoop, WorkerPool internalBlockingPool, WorkerPool workerPool, String deploymentID, JsonObject config,
ClassLoader tccl) {
super(vertx, eventLoop, internalBlockingPool, workerPool, deploymentID, config, tccl);
}
void executeAsync(Handler<Void> task) {
nettyEventLoop().execute(() -> executeTask(null, task));
}
@Override
<T> void execute(T value, Handler<T> task) {
executeTask(value, task);
}
@Override
public boolean isEventLoopContext() {
return true;
}
@Override
public boolean isMultiThreadedWorkerContext() {
return false;
}
}