예제 #1
0
  public MicroservicesRunner() {

    TransportsConfiguration trpConfig = TransportConfigurationBuilder.build();
    Set<ListenerConfiguration> listenerConfigurations = trpConfig.getListenerConfigurations();
    for (ListenerConfiguration listenerConfiguration : listenerConfigurations) {
      NettyListener listener = new NettyListener(listenerConfiguration);
      transportManager.registerTransport(listener);
    }

    NettyTransportDataHolder nettyTransportDataHolder = NettyTransportDataHolder.getInstance();
    nettyTransportDataHolder.addNettyChannelInitializer(
        ListenerConfiguration.DEFAULT_KEY, new MSSNettyServerInitializer());
  }
예제 #2
0
 public void start() {
   transportManager.startTransports();
   log.info("Microservices server started in " + (System.currentTimeMillis() - startTime) + "ms");
 }