Allows direct access to the Undertow.Builder for custom configuration

@param serverConfigurationFunction the serverConfigurationFunction
170259
public ProteusApplication setServerConfigurationFunction(Function<Undertow.Builder, Undertow.Builder> serverConfigurationFunction)
    {
        this.serverConfigurationFunction = serverConfigurationFunction;
        return this;
    }
344294
protected void initServer(IJettyConfiguration iJettyConfiguration) throws JettyBootstrapException {
        if (server == null) {
            server = createServer(iJettyConfiguration);
            server.setConnectors(createConnectors(iJettyConfiguration, server));

            server.setHandler(handlers);

            if (iJettyConfiguration.isStopAtShutdown()) {
                createShutdownHook();
            }
        }
    }
385252
function Builder (config) {
  if (!(config instanceof Config)) {
    config = new Config(config)
  }
  this.config = config
  // TODO: check for root.val
  if (!this.config.native.root) {
    // TODO: simplify this set
    this.config.native.set({
      root: {
        val: process.cwd()
      }
    })
  }
}
1086021
protected org.apache.http.impl.client.HttpClientBuilder customizeBuilder(
        org.apache.http.impl.client.HttpClientBuilder builder
    ) {
        return builder;
    }
932377
@FFDCIgnore(XMLStreamException.class)
    public boolean parseServerConfiguration(InputStream in, String docLocation, BaseConfiguration config,
                                            MergeBehavior mergeBehavior) throws ConfigParserException, ConfigValidationException {
        XMLStreamReader parser = null;
        try {
            parser = getXMLInputFactory().createXMLStreamReader(docLocation, in);
            return parseServerConfiguration(new DepthAwareXMLStreamReader(parser), docLocation, config, mergeBehavior);
        } catch (XMLStreamException e) {
            throw new ConfigParserException(e);
        } finally {
            if (parser != null) {
                try {
                    parser.close();
                } catch (XMLStreamException e) {
                    throw new ConfigParserException(e);
                }
            }
        }
    }
955870
function ( conf ) {
    templateConfig = sqsUtil.copy( conf );

    delete templateConfig.server;

    sqsTemplate.setConfig( "template", templateConfig );
}
594748
public static Builder builder(ServiceMetadata serviceMetadata) {
    checkNotNull(serviceMetadata, "serviceMetadata: null");
    ServerDto server = ServerDto.builder()
        .setHostName(serviceMetadata.getHostName())
        .setStartupDateTime(serviceMetadata.getStartupTime())
        .build();
    BuildDto build = BuildDto.builder()
        .setArtifactName(serviceMetadata.getBuildInfo().getArtifactId())
        .setVersion(serviceMetadata.getBuildInfo().getVersion())
        .setBuildDateTime(serviceMetadata.getBuildInfo().getBuildDateTime())
        .build();
    return new AutoValue_HealthDto.Builder()
        .setServer(server)
        .setbuild(build)
        .setMessage(Optional.empty())
        .setDependencies(Optional.empty());
  }
977775
function (config) {
        config = config || {};

        if (config.onStart !== undefined) {
            if (!isFunction(config.onStart)) {
                throw new core.TypeError({
                    code: 'application-configure',
                    message: "config.onStart must be a function"
                });
            }

            this.onStart = config.onStart;
        }

        if (config.onStop !== undefined) {
            if (!isFunction(config.onStop)) {
                throw new core.TypeError({
                    code: 'application-configure',
                    message: "config.onStop must be a function"
                });
            }
            this.onStop = config.onStop;
        }

        return this;
    }
524878
function (settings) {
  validatePresenceOfOptions(settings, ['urlTemplate', 'userName']);

  if (settings.templateName) {
    this.endpoints = {
      get: [WindshaftConfig.MAPS_API_BASE_URL, 'named', settings.templateName, 'jsonp'].join('/'),
      post: [WindshaftConfig.MAPS_API_BASE_URL, 'named', settings.templateName].join('/')
    };
  } else {
    this.endpoints = {
      get: WindshaftConfig.MAPS_API_BASE_URL,
      post: WindshaftConfig.MAPS_API_BASE_URL
    };
  }

  this.url = settings.urlTemplate.replace('{user}', settings.userName);
  this._requestTracker = new RequestTracker(MAP_INSTANTIATION_LIMIT);
}
299180
function buildBaseTemplate(appConfig, processTypescript) {
    const config = appConfig.appConfig;
    if (config && (config.isDaemon || config.serverMode === 'api')) {
        return persistor(null, null, superType);
    }

    let baseTemplate = persistor(null, null, semotus);

    if (processTypescript) {
        semotus.bindDecorators(baseTemplate);
    }

    return baseTemplate;
}
417291
@SuppressWarnings("unchecked")
    private static void copyParamsToServerConfig() {
        ServerConfig.createInstance();
        for (String moduleName : INSTANCE.m_params.keySet()) {
            Object moduleParams = INSTANCE.m_params.get(moduleName);
            Map<String, Object> paramMap = (Map<String, Object>)moduleParams;
            for (String paramName : paramMap.keySet()) {
                ServerConfig.setParam(paramName, paramMap.get(paramName));
            }
        }
    }
113839
private void initConfig(String[] args) {
        try {
            ServerParams.load(args);
            if (Utils.isEmpty(ServerParams.instance().getModuleParamString("DoradusServer", "super_user"))) {
                m_logger.warn("'DoradusServer.super_user' parameter is not defined. " +
                              "Privileged commands will be available without authentication.");
            }
        } catch (ConfigurationException e) {
            throw new RuntimeException("Failed to initialize server configuration", e);
        }
    }
564393
public void submitContextAndService(final String evaluatorConfiguration,
                                      final String contextConfiguration,
                                      final String serviceConfiguration) {
    launchWithConfigurationString(evaluatorConfiguration, contextConfiguration,
        Optional.of(serviceConfiguration), Optional.<String>empty());
  }
1338321
function generateResourcesHandlingFunctions(resourcesDescriptionList, config){
	const resourcesHandlingFunctions = {};
	Object.keys(resourcesDescriptionList).forEach((resourceName) => {
			const resourceDescription = resourcesDescriptionList[resourceName];
			const resourceCategory = resourceDescription.category;

			resourcesHandlingFunctions[resourceName] = function(userOpts, userCb) {
				//create default request object
				const requestOpts = createDefaultRequestOptObject(resourceDescription);

				//prepare requestOpts based on userOpts, config, etc.
				updateRequestOptsFnList.forEach(
					(updateRequestOptsFn) => updateRequestOptsFn(requestOpts, resourceDescription, userOpts, config)
				);

				const callback = prepareCallback(userCb);

				//send request
				if (resourceCategory === UPLOAD_RESOURCE_CATEGORY) {
					//it's upload type request, so pipe
					if(userOpts.readStream){
						// read stream specified, so pipe it
						return userOpts.readStream.pipe(request(requestOpts, callback));
					}else {
						// readStream not specified, so return writable stream
						return request(requestOpts, callback);
					}
				}else if(resourceCategory === DOWNLOAD_RESOURCE_CATEGORY) {
					return request(requestOpts, callback).pipe(createTransformStream());
				}else {
					//ordinary api call request
					return request(requestOpts, callback);
				}

				function prepareCallback(userCb) {
					return (err, response, body) => {
						if (err) {
							return userCb(err, null, response);
						}

						const responseContentType = response.headers['content-type'];
						const statusCode = response.statusCode;

						const handleResponseByContentType = {
							/* it's content-stream response type, so response object is located inside header */
							'application/octet-stream': () => {
								const dropboxApiResultContent = response.headers[DB_API_RESULT_HEADER_NAME];
								return dropboxApiResultContent && userCb(null, JSON.parse(dropboxApiResultContent), response);
							},
							/* it's ordinary RPC response, so result object is located inside body */
							'application/json': () => {
								const json = body;
								if(statusCode === 200) {
									return userCb(null, json, response);
								}else {
									json.code = statusCode;
									return userCb(json, null, response);
								}
							},
							/* text type response */
							'text/plain; charset=utf-8': () => {
								const text = body;
								if(statusCode === 200) {
									return userCb(null, text, response);
								}else{
									return userCb({
										code: statusCode,
										text: text
									}, null, response);
								}
							}
						};

						const responseHandlerFn = handleResponseByContentType[responseContentType];
						if (responseHandlerFn) {
							responseHandlerFn();
						}else {
							userCb(err || {});
						}
				}
			}
			};
	});
	return resourcesHandlingFunctions;
}
418657
function ( conf ) {
    serverConfig = sqsUtil.copy( conf.server );

    serverConfig.siteurl = serverConfig.siteurl.replace( rSlash, "" );
    serverConfig.port = (serverConfig.port || 5050);
    serverConfig.webroot = process.cwd();
    serverConfig.protocol = serverConfig.siteurl.match( rProtocol )[ 0 ];
    serverConfig.siteData = {};

    // Set config for middleware
    sqsWare.set( "siteurl", serverConfig.siteurl );

    if ( serverConfig.password ) {
        sqsWare.set( "sitepassword", serverConfig.password );
    }

    if ( serverConfig.sandbox ) {
        sqsWare.set( "sandboxmode", true );
    }

    if ( serverConfig.fulldata !== undefined ) {
        sqsWare.set( "fulldata", serverConfig.fulldata );
    }

    sqsTemplate.setConfig( "server", serverConfig );
}
265992
public static void configureAnnotatedHttpServices(
            ServerBuilder server, List<AnnotatedServiceRegistrationBean> beans,
            @Nullable MeterIdPrefixFunctionFactory meterIdPrefixFunctionFactory) {
        requireNonNull(server, "server");
        requireNonNull(beans, "beans");

        beans.forEach(bean -> {
            Function<Service<HttpRequest, HttpResponse>,
                    ? extends Service<HttpRequest, HttpResponse>> decorator = Function.identity();
            for (Function<Service<HttpRequest, HttpResponse>, ? extends Service<HttpRequest, HttpResponse>>
                    d : bean.getDecorators()) {
                decorator = decorator.andThen(d);
            }
            if (meterIdPrefixFunctionFactory != null) {
                decorator = decorator.andThen(
                        metricCollectingServiceDecorator(bean, meterIdPrefixFunctionFactory));
            }
            final ImmutableList<Object> exceptionHandlersAndConverters =
                    ImmutableList.builder()
                                 .addAll(bean.getExceptionHandlers())
                                 .addAll(bean.getRequestConverters())
                                 .addAll(bean.getResponseConverters())
                                 .build();
            server.annotatedService(bean.getPathPrefix(), bean.getService(), decorator,
                                    exceptionHandlersAndConverters);
        });
    }
385104
public static ServerConfiguration loadConfiguration() {
        final ServerConfiguration configuration = createConfiguration();
        Assert.requireNonNull(configuration, "configuration");

        final ServiceLoader<ConfigurationProvider> serviceLoader = ServiceLoader.load(ConfigurationProvider.class);
        for(final ConfigurationProvider provider : serviceLoader) {
            final Map<String, String> additionalStringProperties = provider.getStringProperties();
            for(final Map.Entry<String, String> property : additionalStringProperties.entrySet()) {
                if(!configuration.containsProperty(property.getKey())) {
                    configuration.setProperty(property.getKey(), property.getValue());
                }
            }
            final Map<String, List<String>> additionalListProperties = provider.getListProperties();
            for(final Map.Entry<String, List<String>> property : additionalListProperties.entrySet()) {
                if(!configuration.containsProperty(property.getKey())) {
                    configuration.setListProperty(property.getKey(), property.getValue());
                }
            }
            final Map<String, Boolean> additionalBooleanProperties = provider.getBooleanProperties();
            for(final Map.Entry<String, Boolean> property : additionalBooleanProperties.entrySet()) {
                if(!configuration.containsProperty(property.getKey())) {
                    configuration.setBooleanProperty(property.getKey(), property.getValue());
                }
            }
            final Map<String, Integer> additionalIntegerProperties = provider.getIntegerProperties();
            for(final Map.Entry<String, Integer> property : additionalIntegerProperties.entrySet()) {
                if(!configuration.containsProperty(property.getKey())) {
                    configuration.setIntProperty(property.getKey(), property.getValue());
                }
            }
            final Map<String, Long> additionalLongProperties = provider.getLongProperties();
            for(final Map.Entry<String, Long> property : additionalLongProperties.entrySet()) {
                if(!configuration.containsProperty(property.getKey())) {
                    configuration.setLongProperty(property.getKey(), property.getValue());
                }
            }
        }
        LOG.debug("Configuration created with {} properties", configuration.getPropertyKeys().size());
        if(LOG.isTraceEnabled()) {
            for(final String key : configuration.getPropertyKeys()) {
                LOG.debug("Dolphin Platform configured with '{}'='{}'", key, configuration.getProperty(key, null));
            }
        }

        return configuration;
    }