Creates default request config.

@param settings
settings to use.
@return instance of {@link RequestConfig}.
334312
private RequestConfig createDefaultRequestConfig(HttpSettings settings) {
        int connectionTimeout = settings.getConnectionTimeout();
        int socketTimeout = settings.getReadTimeout();
        return RequestConfig.custom().setConnectionRequestTimeout(connectionTimeout).setSocketTimeout(socketTimeout).build();
    }
399479
private static BucketConfiguration createDefaultConfig(String hostname, int numNodes, int bucketStartPort, int numVBuckets, int numReplicas) {
        BucketConfiguration defaultConfig = new BucketConfiguration();
        defaultConfig.type = BucketType.COUCHBASE;
        defaultConfig.hostname = hostname;
        defaultConfig.numNodes = numNodes;
        if (numReplicas > -1) {
            defaultConfig.numReplicas = numReplicas;
        }

        defaultConfig.bucketStartPort = bucketStartPort;
        defaultConfig.numVBuckets = numVBuckets;
        return defaultConfig;
    }
173632
@XmlElementDecl(namespace = "urn:oasis:names:tc:xacml:3.0:core:schema:wd-17", name = "RequestDefaults")
    public JAXBElement<RequestDefaultsType> createRequestDefaults(RequestDefaultsType value) {
        return new JAXBElement<RequestDefaultsType>(_RequestDefaults_QNAME, RequestDefaultsType.class, null, value);
    }
782046
protected String createURL(HTTPRequest httpRequest,HTTPClientConfiguration configuration)
    {
        //init buffer
        StringBuilder buffer=new StringBuilder(100);

        //create URL
        String resource=httpRequest.getResource();
        this.appendBaseURL(buffer,resource,configuration);
        String parameters=httpRequest.getParametersText();
        this.appendParameters(buffer,parameters);
        String url=buffer.toString();
        
        return url;
    }
756036
@Override
    public ConfigurableRequest createRequest(
            @Nonnull final URI uri,
            @Nonnull final HttpMethod httpMethod) throws IOException {
        HttpRequestBase httpRequest = (HttpRequestBase) createHttpUriRequest(httpMethod, uri);
        return new Request(getHttpClient(), httpRequest, createHttpContext(httpMethod, uri));
    }
1283667
public SearchSettings getSearchSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        SearchSettings request = new SearchSettings();
        request.setType(IQ.Type.get);
        request.setTo(workgroupJID);

        SearchSettings response = connection.createStanzaCollectorAndSend(request).nextResultOrThrow();
        return response;
    }
949456
public Settings buildSettings(SettingsBuildingRequest request) {
        SettingsBuildingResult result;
        try {
            SettingsBuilder builder = new DefaultSettingsBuilderFactory().newInstance();

            if (request.getGlobalSettingsFile() != null) {
                log.log(Level.FINE, "Using {0} to get global Maven settings.xml", request.getGlobalSettingsFile()
                        .getAbsolutePath());
            }
            final File userSettingsFile = request.getUserSettingsFile();
            if (userSettingsFile != null) {
                log.log(Level.FINE, "Using {0} to get user Maven settings.xml", userSettingsFile.getAbsolutePath());

                // Maven will not check the format passed in (any XML will do), so let's ensure we have a
                // settings.xml by checking just the top-level element
                final XMLStreamReader reader;
                try {
                    reader = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(userSettingsFile));
                    // get the first element name
                    while (reader.hasNext()) {
                        if (reader.next() == XMLStreamConstants.START_ELEMENT) {
                            break;
                        }
                    }
                    final String topLevel = reader.getLocalName();

                    if (!"settings".equals(topLevel)) {
                        throw new InvalidConfigurationFileException("Invalid format settings.xml found: "
                                + userSettingsFile);
                    }
                } catch (final FileNotFoundException e) {
                    // Ignore at this level
                } catch (final XMLStreamException xmlse) {
                    throw new RuntimeException("Could not check file format of specified settings.xml: "
                            + userSettingsFile, xmlse);
                }

            }

            result = builder.build(request);
        }
        // wrap exception message
        catch (SettingsBuildingException e) {
            StringBuilder sb = new StringBuilder("Found ").append(e.getProblems().size())
                    .append(" problems while building settings.xml model from both global Maven configuration file")
                    .append(request.getGlobalSettingsFile()).append(" and/or user configuration file: ")
                    .append(request.getUserSettingsFile()).append("\n");

            int counter = 1;
            for (SettingsProblem problem : e.getProblems()) {
                sb.append(counter++).append("/ ").append(problem).append("\n");
            }

            throw new InvalidConfigurationFileException(sb.toString());
        }

        // get settings object and update it according to property values
        Settings settings = result.getEffectiveSettings();
        settings = enrichWithLocalRepository(settings);
        settings = enrichWithOfflineMode(settings);
        settings = decryptPasswords(settings);
        return settings;
    }
717672
public static Configuration defaultConfiguration() {
        Defaults defaults = getEffectiveDefaults();
        return Configuration.builder().jsonProvider(defaults.jsonProvider()).options(defaults.options()).build();
    }
623714
private FileFilter createConfigFilesFilter() {
        SiteConfig config = site.getConfig();
        boolean useDefaultConfigFiles = config.useDefaultConfigFiles();
        if (useDefaultConfigFiles) {
            log.debug("Using default config files.");
            return SiteConfigImpl.DEFAULT_CONFIG_FILES_FILTER;
        } else {//custom config files
            final File[] configFiles = config.getConfigFiles();
            return new FileFilter() {
                @Override
                public boolean accept(File file) {
                    for (File configFile : configFiles) {
                        if (configFile.equals(file)) {
                            return true;
                        }
                    }
                    return false;
                }
            };
        }
    }
1278297
public static ConfigurationOptionBuilder<List<URL>> urlsOption() {
		return new ConfigurationOptionBuilder<List<URL>>(new ListValueConverter<URL>(UrlValueConverter.INSTANCE), List.class)
				.defaultValue(Collections.<URL>emptyList());
	}
787072
public CreateRouteRequest withRequestParameters(java.util.Map<String, ParameterConstraints> requestParameters) {
        setRequestParameters(requestParameters);
        return this;
    }
933104
public JRecordExtractor<T, double[]> extractWithSubsetSettingsDouble(String settings) {
    return new JRecordExtractor<>(JavaOps.extractWithSubsetSettingsDouble(self, settings));
  }
465072
protected ResourceConfig createResourceConfig(WebConfig webConfig)
        throws BeansException
    {
        return WebApplicationContextUtils.getWebApplicationContext(webConfig.getServletContext())
            .getBean(webConfig.getServletConfig().getInitParameter(REST_APPLICATION), ResourceConfig.class);
    }
1015202
protected void configureDefaults() throws Exception
    {
        //next, configure default settings
        for (int i=0;i<_configurations.length;i++)
        {
            _configurations[i].setWebApplicationContext(this);
            _configurations[i].configureDefaults();
        }
    }
1188195
public static DSFactory create(Setting setting) {
		final DSFactory dsFactory = doCreate(setting);
		log.debug("Use [{}] DataSource As Default", dsFactory.dataSourceName);
		return dsFactory;
	}
294490
public function setSettingsByRequest()
    {
        $allAllowedSettings = array_keys($this->allSettings()->toArray());

        return $this->settings()->set(request()->only($allAllowedSettings));
    }
179355
public static com.typesafe.config.Config getConfig() {
		if (config == null) {
			init(null);
		}
		return config;
	}