package io.scalecube.gateway.http;

import io.scalecube.services.ServiceCall;
import io.scalecube.services.gateway.Gateway;
import io.scalecube.services.gateway.GatewayConfig;
import io.scalecube.services.metrics.Metrics;

import reactor.core.publisher.Mono;
import reactor.ipc.netty.http.server.HttpServer;
import reactor.ipc.netty.tcp.BlockingNettyContext;

import io.netty.channel.EventLoopGroup;

import java.net.InetSocketAddress;
import java.util.concurrent.ExecutorService;

public class HttpGateway implements Gateway {

  private BlockingNettyContext server;

  @Override
  public Mono<InetSocketAddress> start(GatewayConfig config, ExecutorService executorService, ServiceCall.Call call,
      Metrics metrics) {

    return Mono.defer(() -> {
      InetSocketAddress listenAddress = new InetSocketAddress(config.port());
      GatewayHttpAcceptor acceptor = new GatewayHttpAcceptor(call.create());

      server = HttpServer.builder()
          .options(opts -> {
            opts.listenAddress(listenAddress);
            if (config.executorService() != null) {
              opts.eventLoopGroup((EventLoopGroup) config.executorService());
            } else if (executorService != null) {
              opts.eventLoopGroup((EventLoopGroup) executorService);
            }
          })
          .build()
          .start(acceptor);
      server.installShutdownHook();
      InetSocketAddress address = server.getContext().address();
      return Mono.just(address);
    });
  }

  @Override
  public Mono<Void> stop() {
    return Mono.fromRunnable(() -> {
      if (server != null) {
        server.shutdown();
      }
    });
  }
}

@@ -216,16 +216,73 @@
 trics;%0A%0A
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A
 import r
@@ -309,16 +309,16 @@
 r.Mono;%0A
-
 import r
@@ -579,16 +579,100 @@
 eway %7B%0A%0A
+  private static final Logger LOGGER = LoggerFactory.getLogger(HttpGateway.class);%0A%0A
   privat
@@ -884,24 +884,80 @@
 fer(() -%3E %7B%0A
+      LOGGER.info(%22Starting gateway with %7B%7D%22, config);%0A%0A
       InetSo
@@ -1567,24 +1567,24 @@
 downHook();%0A
-
       InetSo
@@ -1632,24 +1632,101 @@
 .address();%0A
+%0A      LOGGER.info(%22Gateway has been started successfully on %7B%7D%22, address);%0A%0A
       return

Create generic docker for gateway