Initialize the controller with a configuration.

@param config the configuration

@throws InitializationException        if the initialization fails
@throws java.lang.InterruptedException if the initialization is interrupted
332638
@Override
    public void init(final CONFIG config) throws InitializationException, InterruptedException {
        try {
            try(final CloseableWriteLockWrapper ignored = getManageWriteLock(this)) {
                if (config == null) {
                    throw new NotAvailableException("config");
                }
                currentScope = detectScope(config);
                applyConfigUpdate(config);
            }
            super.init(currentScope);
        } catch (CouldNotPerformException ex) {
            throw new InitializationException(this, ex);
        }
    }
55624
protected function _initialize(ObjectConfig $config)
    {
        $config->append(array(
            'priority' => self::PRIORITY_LOWEST,
        ));

        parent::_initialize($config);
    }
81074
public void setConfig(Map<String, ? extends CacheConfig> config) {
        this.configMap = (Map<String, CacheConfig>) config;
    }
1222181
public function initConfiguration(Configuration $configuration = null)
    {
        if (isset($configuration)) {
            $this->configuration = $configuration;
        }

        if (isset($this->configuration)) {
            $this->setLogger($this->configuration->getLogger());
            $this->componentFactory = null;
            $this->prepareFactory();
        }
    }
22995
public void init(ServletConfig config)
         throws ServletException
    {
        super.init(config);

        Enumeration enm = config.getInitParameterNames();
        while (enm.hasMoreElements())
        {
            String path=(String)enm.nextElement();
            String forward=config.getInitParameter(path);
            _forwardMap.put(path,forward);
        }

    }
131086
static void initDrivers(final Config config) throws InitializationException {
      for(String driverName : uniquePrefixSet(config)) {
         Config driverConfig = config.getObject(driverName).toConfig();
         if(driverConfig.hasPath("class")) {
            String className = driverConfig.getString("class");
            try {
               Class.forName(className);
            } catch(Throwable t) {
               throw new InitializationException("Unable to load JDBC driver, '" + className + "'", t);
            }
         } else {
            throw new InitializationException("A 'class' must be specified for JDBC driver, '" + driverName + "'");
         }
      }
   }
572867
@Override
  public synchronized void init(PlayerConfig config) {
    super.init(config);
    this.fields = new HashMap<String, FieldType>();
    String fields = config.get(FIELDS_KEY);
    if (fields == null || "".equals(fields.trim())) {
      throw new IllegalArgumentException(this.getClass().getName() + " expects configuration property " + FIELDS_KEY);
    }
    String[] fieldsWithTypes = fields.split(" ");
    for (String fieldWithType : fieldsWithTypes) {
      String[] singleField = fieldWithType.split(":");
      if (singleField.length != 2) {
        continue;
      }
      FieldType type = getFieldType(singleField[1]);
      if (type != null) {
        this.fields.put(singleField[0], type);
      }
    }
  }
77116
public function initialize(array $config)
    {
        $this->setController($this->_registry->getController());

        $this->_registerPostTypesFromConfigure();

        $this->_addMenuItems();
    }
890814
@Override
  public void init(PlayerConfig config) {
    maxEvents = Integer.valueOf(config.get(MAX_EVENTS_KEY));
    producedEvents = 0;
  }
612297
public void init(String name, Map<String,Object> config) {
        if(config==null)
            config = Objects.newSOHashMap();
        this.name = name;
        this.config = config;
    }
696140
public static synchronized void configure(final ApiConfiguration config) {
		
		ApiConfiguration.Builder builder = ApiConfiguration.newBuilder();
		
		builder.apiUrl(config.getApiUrl());
		builder.apiKey(config.getApiKey());
		builder.application(config.getApplication());
		builder.environment(config.getEnvironment());
		
		if (config.getEnvDetail() == null)
		{
			builder.envDetail(EnvironmentDetails.getEnvironmentDetail(config.getApplication(), config.getEnvironment()));
		}
		else
		{
			builder.envDetail(config.getEnvDetail());
		}
		
		CONFIG = builder.build();
	}
420484
public function init( $config = [ ] )
    {
        foreach ( $config as $key => $value )
        {
            switch ( $key )
            {
                case 'level':
                    $this->_level = ( int ) $value;
                    break;

                case 'mailer':
                    $this->_mailer = $value;
                    break;

                case 'formatter':
                    $this->_formatter = new $value();
                    break;

                default:
                    // do nothing
                    break;
            }
        }
    }
1372518
public static void initialize(final AbstractConfig config, final BenchmarkResult result) {
        METERS_TO_BENCH.clear();
        METERS_TO_BENCH.addAll(Arrays.asList(config.getMeters()));
        EXECUTOR.clear();
        BENCHRES = result;
        CONFIG = config;

    }
527326
public void init(ServletConfig config) throws ServletException {
        /*
         * Never forget super.init()!
         */
        super.init(config);

        /*
         * Grab the servlet context.
         */
        this.servletContext = config.getServletContext();

        // Get verbosity hint.
        String value = config.getInitParameter("verbose");
        if (value != null) {
            this.verbose = Boolean.valueOf(value);
        }

        // get encoding
        value = config.getInitParameter("encoding");
        if (value != null) {
            this.encoding = value;
        }

        // And now the real init work...
        if (verbose) {
            log("Parsing init parameters...");
        }

        String regex = config.getInitParameter(INIT_PARAM_RESOURCE_NAME_REGEX);
        if (regex != null) {
            String replacement = config.getInitParameter("resource.name.replacement");
            if (replacement == null) {
                Exception npex = new NullPointerException("resource.name.replacement");
                String message = "Init-param 'resource.name.replacement' not specified!";
                log(message, npex);
                throw new ServletException(message, npex);
            } else if ("EMPTY_STRING".equals(replacement)) {//<param-value></param-value> is prohibited
                replacement = "";
            }
            int flags = 0; // TODO : Parse pattern compile flags (literal names).
            String flagsStr = config.getInitParameter(INIT_PARAM_RESOURCE_NAME_REGEX_FLAGS);
            if (flagsStr != null && flagsStr.length() > 0) {
              flags = Integer.decode(flagsStr.trim());//throws NumberFormatException
            }
            resourceNamePattern = Pattern.compile(regex, flags);
            this.resourceNameReplacement = replacement;
            String all = config.getInitParameter("resource.name.replace.all");
            if (all != null) {
                this.resourceNameReplaceAll = Boolean.valueOf(all.trim());
            }
        }

        value = config.getInitParameter("logGROOVY861");
        if (value != null) {
            this.logGROOVY861 = Boolean.valueOf(value);
            // nothing else to do here
        }

        /*
         * If verbose, log the parameter values.
         */
        if (verbose) {
            log("(Abstract) init done. Listing some parameter name/value pairs:");
            log("verbose = " + verbose); // this *is* verbose! ;)
            log("reflection = " + reflection);
            log("logGROOVY861 = " + logGROOVY861);
            log(INIT_PARAM_RESOURCE_NAME_REGEX + " = " + resourceNamePattern);//toString == pattern
            log("resource.name.replacement = " + resourceNameReplacement);
        }
    }
1054580
public void configure(Config config) {
    LOGGER.debug("Reloading configuration.");
    this.configWriteLock.lock();
    try {
      this.config = config;
      processAppPackages(config);
    } finally {
      this.configWriteLock.unlock();
    }
  }
245424
public static final void init(final CClassLoaderConfig config) {
		CClassLoader.installURLStreamHandlerFactory();
		if (CClassLoader.getRootLoader().isInit()) {
			return;
		}

		// initialize the loaders default parameters.
		for (final Iterator it = config.getLoadersInfoMap().entrySet()
				.iterator(); it.hasNext();) {
			final Map.Entry entry = (Map.Entry) it.next();
			final String loaderPath = (String) entry.getKey();
			final CClassLoaderConfig.CLoaderInfo info = (CClassLoaderConfig.CLoaderInfo) entry
					.getValue();
			final CClassLoader loader = CClassLoader.getLoader(loaderPath);
			loader.config = config;
			loader.booAlone = info.isAlone();
			loader.booDoNotForwardToParent = info.isDoNotForwardToParent();
			loader.booMandatory = info.isMandatory();

			if (loader.isMandatory()) {
				CClassLoader.mandatoryLoadersMap.put(loader.getPath(), loader);
			}

			loader.booResourceOnly = info.isResourceOnly();
		}
		// lookup classes/resources in filesystem
		for (final Iterator it = config.getFilesMap().entrySet().iterator(); it
				.hasNext();) {
			final Map.Entry entry = (Map.Entry) it.next();
			final String loaderPath = (String) entry.getKey();
			final List list = (List) entry.getValue();
			final CClassLoader loader = CClassLoader.getLoader(loaderPath);

			for (final Iterator f = list.iterator(); f.hasNext();) {
				final Object obj = f.next();
				if (obj instanceof URL) {
					final URL file = (URL) obj;
					String name = file.toString();
					final int index = name.indexOf(loaderPath);
					if (index != -1) {
						name = name.substring(index + loaderPath.length());
					}
					if (name.endsWith(".jar")) {
						loader.addResource(name, file);
						loader.readDirectories(file);
					} else {
						loader.addResource(name, file);
						if (!loader.booResourceOnly && name.endsWith(".class")) {
							name = name.substring(0, name.lastIndexOf('.'));
							name = name.replace('\\', '/');
							name = name.replace('/', '.');
							loader.addClass(name, file);
						} else if (name.startsWith("native/")) {
							String system = name.substring(7);
							system = system.substring(0, system.indexOf('/'));
							if (!loader.dllMap.containsKey(system)) {
								loader.dllMap.put(system, file);
							}
							if (!loader.resourcesMap.containsKey(name)) {
								loader.resourcesMap.put(name, file);
							} else {
								final Object to = loader.resourcesMap.get(name);
								if (to instanceof URL) {
									final URL uo = (URL) to;
									final List l = new ArrayList();
									l.add(uo);
									l.add(file);
									loader.resourcesMap.put(name, l);
								} else if (to instanceof List) {
									final List uo = (List) to;
									uo.add(file);
									loader.resourcesMap.put(name, uo);
								}
							}
						}
					}
				}
			}
		}

		// set init state
		CClassLoader.setInit(CClassLoader.getRootLoader());
	}
95745
public void init(FilterConfig config) throws ServletException {
    super.init(config);

    String temp = config.getInitParameter("approot");

    if (temp == null) {
      throw new ServletException("Missing required init parameter: approot");
    }

    pstate = new PresentationState();
    pstate.setAppRoot(temp);

    temp = config.getInitParameter("noxslt");
    pstate.setNoXSLTSticky("yes".equals(temp));
  }