public WebServerImpl build()
  {
    EnvLoader.init();

    _systemManager = createSystemManager();

    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();

    boolean isValid = false;
    try {
      thread.setContextClassLoader(_systemManager.getClassLoader());

      Vfs.setPwd(getRootDirectory());

      /*
      if (! isEmbedded()) {
        logCopyright();
      }
      */
      logCopyright();

      preConfigureInit();

      configureRootDirectory();

      _serverSelf = initNetwork();
      Objects.requireNonNull(_serverSelf);

      addServices(); // _serverSelf);

      initHttpSystem(_systemManager, _serverSelf);

      WebServerImpl server = new WebServerImpl(this);
      /*
      build(systemManager,
            _serverSelf);
            */

      // init(server);

      isValid = true;

      _systemManager.start();

      return server;
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw ConfigException.wrap(e);
    } finally {
      thread.setContextClassLoader(oldLoader);

      if (! isValid) {
        _systemManager.shutdown(ShutdownModeAmp.IMMEDIATE);
      }
    }
  }
public WebServerImpl build ( ) { EnvLoader . init ( ) ; _systemManager = createSystemManager ( ) ; Thread thread = Thread . currentThread ( ) ; ClassLoader oldLoader = thread . getContextClassLoader ( ) ; boolean isValid = false ; try { thread . setContextClassLoader ( _systemManager . getClassLoader ( ) ) ; Vfs . setPwd ( getRootDirectory ( ) ) ; logCopyright ( ) ; preConfigureInit ( ) ; configureRootDirectory ( ) ; _serverSelf = initNetwork ( ) ; Objects . requireNonNull ( _serverSelf ) ; addServices ( ) ; initHttpSystem ( _systemManager , _serverSelf ) ; WebServerImpl server = new WebServerImpl ( this ) ; isValid = true ; _systemManager . start ( ) ; return server ; } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { throw ConfigException . wrap ( e ) ; } finally { thread . setContextClassLoader ( oldLoader ) ; if ( ! isValid ) { _systemManager . shutdown ( ShutdownModeAmp . IMMEDIATE ) ; } } }
/*
public StatProbeManager getStatProbeManager()
{
return _statProbeManager;
}