class EdgeBootListener implements BootListener {

  @Override
  public void onBootEvent(BootEvent event) {
    if (!EventType.BEFORE_PRODUCER_PROVIDER.equals(event.getEventType())) {
      return;
    }

    TransportClientConfig.setRestTransportClientCls(EdgeRestTransportClient.class);
    TransportConfig.setRestServerVerticle(EdgeRestServerVerticle.class);

    String defaultExecutor = DynamicPropertyFactory.getInstance()
        .getStringProperty(ExecutorManager.KEY_EXECUTORS_DEFAULT, null)
        .get();
    if (defaultExecutor != null) {
      LOGGER.info("Edge service default executor is {}.", defaultExecutor);
      return;
    }

    // change default to reactive mode
    Configuration configuration = (Configuration) DynamicPropertyFactory.getBackingConfigurationSource();
    configuration.setProperty(ExecutorManager.KEY_EXECUTORS_DEFAULT, ExecutorManager.EXECUTOR_REACTIVE);
    LOGGER.info("Set ReactiveExecutor to be edge service default executor.");
  }

}