Initializes services
765364
public function initServices(Config $config)
    {
        $serviceProviderLoader = new ServiceProviderLoader($this->getDI());
        $serviceProviderLoader->autoload(
            $config->application->serviceDir,
            $config->application->configDir
        );
    }
844766
protected function initialize()
    {
        parent::initialize();

        // unless already configured, set default options to include exceptions
        $options = $this->defaults->getOptions() ?: [];

        foreach ($this->soapOptionDefaults as $option => $value) {

            if ( ! array_key_exists($option, $options)) {

                $options[ $option ] = $value;
            }
        }

        $this->defaults->setOptions($options);
    }
912614
private void initServices(Set<String> serviceSet) {
        for (String serviceName : serviceSet) {
            Service service = initService(serviceName);
            m_initializedServices.add(service);
            if (service instanceof StorageService) {
                m_storageServices.add((StorageService) service);
            }
        }
        if (m_storageServices.size() == 0) {
            throw new RuntimeException("No storage services were configured");
        }
    }
637767
@PostConstruct
    public void init() {
        //init Bus and LifeCycle listeners
        if (bus != null && sendLifecycleEvent ) {
                ServerLifeCycleManager slcm = bus.getExtension(ServerLifeCycleManager.class);
                if (null != slcm) {
                    ServiceListenerImpl svrListener = new ServiceListenerImpl();
                    svrListener.setSendLifecycleEvent(sendLifecycleEvent);
                    svrListener.setQueue(queue);
                    svrListener.setMonitoringServiceClient(monitoringServiceClient);
                    slcm.registerListener(svrListener);
                }

                ClientLifeCycleManager clcm = bus.getExtension(ClientLifeCycleManager.class);
                if (null != clcm) {
                    ClientListenerImpl cltListener = new ClientListenerImpl();
                    cltListener.setSendLifecycleEvent(sendLifecycleEvent);
                    cltListener.setQueue(queue);
                    cltListener.setMonitoringServiceClient(monitoringServiceClient);
                    clcm.registerListener(cltListener);
                }
        }

        if(executorQueueSize == 0) {
        	executor = Executors.newFixedThreadPool(this.executorPoolSize);
        }else{
            executor = new ThreadPoolExecutor(executorPoolSize, executorPoolSize, 0, TimeUnit.SECONDS, 
            		new LinkedBlockingQueue<Runnable>(executorQueueSize), Executors.defaultThreadFactory(), 
            			new RejectedExecutionHandlerImpl());
        }

        scheduler = new Timer();
        scheduler.scheduleAtFixedRate(new TimerTask() {
            public void run() {
                sendEventsFromQueue();
            }
        }, 0, getDefaultInterval());
    }
611388
protected function initialize(): void
	{
		// Create container instance and register it in itself so that it can be injected

		$this->container = $this->containerFactory();

		$this->container->registerInstance([Container::class, 'container'], $this->container);

		// Register self so that the application instance can be injected

		$this->container->registerInstance([Application::class, 'app'], $this);

		// Register file system instance

		$this->container->registerInstance([FileSystem::class, 'fileSystem'], new FileSystem);

		// Register config instance

		$this->config = $this->configFactory();

		$this->container->registerInstance([Config::class, 'config'], $this->config);
	}
1194622
function(callback) {
            var toInit = ['config', 'logger'];
            loader.loadServices(path.resolve(serverRoot, 'services'));
            injectDependencies(loader);

            loader.init(toInit, function(err) {
                callback(err);
            });
        }
1331429
private void init() {
    host = DEFAULT_HOST;
    port = DEFAULT_PORT;
    database = DEFAULT_DATABASE;
    user = DEFAULT_USER;
    password = DEFAULT_PASSWORD;
    cachePreparedStatements = DEFAULT_CACHE_PREPARED_STATEMENTS;
    pipeliningLimit = DEFAULT_PIPELINING_LIMIT;
    sslMode = DEFAULT_SSLMODE;
  }
508454
function initServices (config) {
    // get services directory
    var dirs = getDir(config, 'services')
    // load services definitions from each directory
    _.each(dirs, dir => initServicesDir(config, dir))
    // create new service instances from definitions
    _.each(config.services, (service, name) => {
        config.services[name] = new ImmutableCoreService(service)
    })
    // initialize all services
    return ImmutableCoreService.initializeAll()
}
186347
private function initializeServiceContainer()
    {
        $this->containerManager = new ServiceContainerManager($this->dispatcher, $this->getLogger());
        $class = $this->getContainerClass();
        $container = $this->containerManager->initializeServiceContainer($class);
        $this->dispatcher->notify(new sfEvent($container, 'service_container.loaded'));

    }
125984
protected void init() {
    if (settings.autostart()) {
      runner = settings.getRunner();
      logger.config("Using runner " + runner.getClass().getSimpleName());
    } else {
      settings.setPort(OperaDefaults.SERVER_DEFAULT_PORT_IDENTIFIER);
    }

    createScopeServices();

    // Launch Opera if the runner has been setup
    if (runner != null) {
      runner.startOpera();
    }

    services.init();
    debugger = services.getDebugger();
    debugger.setDriver(this);

    windowManager = services.getWindowManager();
    exec = services.getExec();
    core = services.getCore();
    cookieManager = services.getCookieManager();
    //cookieManager.updateCookieSettings();

    mouse = new OperaMouse(this);
    keyboard = new OperaKeyboard(this);
    services.getConsoleLogger().onConsoleMessage(new ConsoleMessageConverter(logs));

    // Get product from Opera
    settings.setProduct(utils().getProduct());

    // TODO(andreastt): Expose profile on core service
    if (!utils().getUserAgent().contains("Mini")) {
      preferences = new OperaScopePreferences(services.getPrefs());

      // Enable popups for testing purposes
      preferences().set("User Prefs", "Ignore Unrequested Popups", false);

      // Mobile has disabled JavaScript autofocus for usability reasons
      if (utils().getProduct().is(MOBILE)) {
        preferences().set("User Prefs", "Allow Autofocus Form Element", true);
      }
    }

    // Update browser's proxy configuration
    proxy = new OperaProxy(this);
    proxy.parse(settings.getProxy());
  }
346279
protected static function init()
    {
        self::$_endpointSetting = self::settingWithFunc(
            Resources::SERVICE_MANAGEMENT_ENDPOINT_NAME,
            Validate::getIsValidUri()
        );

        self::$_certificatePathSetting = self::setting(
            Resources::CERTIFICATE_PATH_NAME
        );

        self::$_subscriptionIdSetting = self::setting(
            Resources::SUBSCRIPTION_ID_NAME
        );

        self::$validSettingKeys[] = Resources::SUBSCRIPTION_ID_NAME;
        self::$validSettingKeys[] = Resources::CERTIFICATE_PATH_NAME;
        self::$validSettingKeys[] = Resources::SERVICE_MANAGEMENT_ENDPOINT_NAME;
    }
1253356
public function initConfigs()
    {
        // Check configurations
        if (empty($this->configurations)) {
            return;
        }

        // Get available configurations
        $available = $this->getConfigurations();

        // Iterate
        foreach ($this->configurations as $component => $file) {
            // Check if configuration asked exists
            if (!array_key_exists($component, $available)) {
                continue;
            }

            $service = $this->get($component);

            // Check service integrity
            if (!$service) {
                continue;
            }

            // Initialize service
            $service->setPath($file);
            $service->init();
        }
    }
405896
private Service initService(String serviceName) {
        m_logger.debug("Initializing service: " + serviceName);
        try {
            @SuppressWarnings("unchecked")
            Class<Service> serviceClass = (Class<Service>) Class.forName(serviceName);
            Method instanceMethod = serviceClass.getMethod("instance", (Class<?>[])null);
            Service instance = (Service)instanceMethod.invoke(null, (Object[])null);
            instance.initialize();
            return instance;
        } catch (Exception e) {
            throw new RuntimeException("Error initializing service: " + serviceName, e);
        }
    }
1053234
protected function initServiceClient()
    {
        if ($this->httpClient === null) {
            $this->initHttpClients();
        }

        $serviceDescription = new Description($this->config->getServiceDescriptionConfig());
        $serviceClient = new GuzzleClient($this->getHttpClient(), $serviceDescription);

        foreach ($this->config->getClientDefaultsConfig() as $option => $value) {
            $serviceClient->setConfig($option, $value);
        }

        $this->description = $serviceDescription;
        $this->serviceClient = $serviceClient;
    }
809822
private <T extends OrchidService> void initializeService(Class<T> serviceClass, T service) {
        services.put(serviceClass, service);
    }
257296
public function initialize()
    {
        Facade::setContainer($this->container);

        if (null !== $loader = $this->loader) {
            $loader->register();
        }
    }
1148829
public function _initialize() {
        $config = Config::getFileConfig()[ 'rpc_service' ];
        $this->config = array_merge($this->config, $config);
    }