Sets the http port and Fedora default http connector options.

@see "http://tomcat.apache.org/tomcat-6.0-doc/config/http.html"
@throws InstallationFailedException
507164
public void setHTTPPort() throws InstallationFailedException {
        // Note this very significant assumption: this xpath will select exactly one connector
        Element httpConnector =
                (Element) getDocument()
                        .selectSingleNode(HTTP_CONNECTOR_XPATH);

        if (httpConnector == null) {
            throw new InstallationFailedException("Unable to set server.xml HTTP Port. XPath for Connector element failed.");
        }

        httpConnector.addAttribute("port", options
                .getValue(InstallOptions.TOMCAT_HTTP_PORT));
        httpConnector.addAttribute("enableLookups", "true"); // supports client dns/fqdn in xacml authz policies
        httpConnector.addAttribute("acceptCount", "100");
        httpConnector.addAttribute("maxThreads", "150");
        httpConnector.addAttribute("minSpareThreads", "25");
        httpConnector.addAttribute("maxSpareThreads", "75");
    }
960240
private String configureHttpPort() {
        String result;
        result = String.format(
                "sudo sed -i 's@Listen[ 0-9]\\+@Listen %s@g' %s/ports.conf",
                getEntity().getHttpPort(),
                getEntity().getConfigurationDir()
        );
        return result;
    }
937126
private function configureHttpClient()
    {
        $httpClientDefaults = [
            'timeout' => $this->config->get('timeout'),
        ];

        $httpClientConfig = $this->config->get('httpClient') ?? [];

        $this->client = new Client(array_merge($httpClientDefaults, $httpClientConfig));
    }
1105809
public void setPipeConfig(DeviceProxy deviceProxy, List<PipeInfo> pipeInfoList) throws DevFailed {
        build_connection(deviceProxy);
        if (deviceProxy.idl_version<5)
            Except.throw_exception("TangoApi_NOT_SUPPORTED",
                    "Pipe not supported in IDL " + deviceProxy.idl_version);
        boolean done = false;
        final int retries = deviceProxy.transparent_reconnection ? 2 : 1;
        for (int tr=0 ; tr<retries && !done ; tr++) {
            try {
                PipeConfig[]  configList = new PipeConfig[pipeInfoList.size()];
                for (int i=0 ; i<pipeInfoList.size() ; i++) {
                    configList[i] = pipeInfoList.get(i).getPipeConfig();
                }
                deviceProxy.device_5.set_pipe_config_5(
                        configList, DevLockManager.getInstance().getClntIdent());
                done = true;
            }
            catch (final DevFailed e) {
                throw e;
            }
            catch (final Exception e) {
                manageExceptionReconnection(deviceProxy, retries, tr, e,
                        this.getClass() + ".DeviceProxy.setPipeConfig");
            }
        }
}
49701
@Override
	public void setProxyHostPort(String hostPort) {
    	int colonIdx = hostPort.indexOf(':');
    	if(colonIdx > 0) {
    		String host = hostPort.substring(0,colonIdx);
    		int port = Integer.valueOf(hostPort.substring(colonIdx+1));
    		
//            http.getHostConfiguration().setProxy(host, port);
    		hostConfiguration.setProxy(host, port);
    	}
    }
1004948
private void setupHostFromArquillianConfig(final URL arquillianXml) {

        final String arquillianLaunch = System.getProperty("arquillian.launch");

        if (arquillianLaunch == null) {
            LOG.warn("No launch configuration specified, using default");

        } else {
            final String arquillianHost = getActiveArquillianHost(arquillianXml, arquillianLaunch);
            if (arquillianHost != null) {
                remoteHost = arquillianHost;
            }
        }

    }
162245
@Override
	protected void configure(HttpSecurity http) throws Exception {
		ConfigObject protectedResources = Config.getConfig().getObject("security.protected");
		ConfigValue apiSec = Config.getConfig().getValue("security.api_security");
		boolean enableRestFilter = apiSec != null && Boolean.TRUE.equals(apiSec.unwrapped());
		String signinPath = Config.getConfigParam("security.signin", "/signin");
		String signoutPath = Config.getConfigParam("security.signout", "/signout");
		String accessDeniedPath = Config.getConfigParam("security.access_denied", "/403");
		String signoutSuccessPath = Config.getConfigParam("security.signout_success", signinPath);

		// If API security is disabled don't add the API endpoint to the list of protected resources
		if (enableRestFilter) {
			http.authorizeRequests().requestMatchers(RestRequestMatcher.INSTANCE);
		}

		parseProtectedResources(http, protectedResources);

		if (Config.getConfigBoolean("security.csrf_protection", true)) {
			http.csrf().requireCsrfProtectionMatcher(CsrfProtectionRequestMatcher.INSTANCE).
					csrfTokenRepository(csrfTokenRepository);
		} else {
			http.csrf().disable();
		}

		http.sessionManagement().enableSessionUrlRewriting(false);
		http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.NEVER);
		http.sessionManagement().sessionAuthenticationStrategy(new NullAuthenticatedSessionStrategy());
		http.exceptionHandling().authenticationEntryPoint(new SimpleAuthenticationEntryPoint(signinPath));
		http.exceptionHandling().accessDeniedHandler(new SimpleAccessDeniedHandler(accessDeniedPath));
		http.requestCache().requestCache(new SimpleRequestCache());
		http.logout().logoutUrl(signoutPath).logoutSuccessUrl(signoutSuccessPath);
		http.rememberMe().rememberMeServices(rememberMeServices);

		registerAuthFilters(http);

		if (enableRestFilter) {
			if (jwtFilter != null) {
				jwtFilter.setAuthenticationManager(authenticationManager());
				http.addFilterBefore(jwtFilter, RememberMeAuthenticationFilter.class);
			}
			RestAuthFilter restFilter = new RestAuthFilter();
			http.addFilterAfter(restFilter, JWTRestfulAuthFilter.class);
		}
	}
123970
private function setRetryAttemptsIfConfigured()
    {
        if (isset($this->config['connection_attempts']) &&
            is_numeric($this->config['connection_attempts'])) {
            $this->maxAttempts = $this->config['connection_attempts'];
        }
    }
935682
public void set_rpc_protocol(final DeviceProxy deviceProxy, final int mode) throws DevFailed {
        checkIfTaco(deviceProxy, "dev_rpc_protocol");

        build_connection(deviceProxy);

        deviceProxy.taco_device.set_rpc_protocol(mode);
    }
324371
protected function updateHostHeaderFromUri()
    {
        if ($host = $this->uri->getHost()) {
            if (($port = $this->uri->getPort()) !== null) {
                $host .= ':' . $port;
            }

            $this->headers->set('Host', $host);
        }
    }
279167
protected function setHttpClientConfiguration()
    {
        $this->setCurlConstants();

        $this->httpClientConfig = [
            CURLOPT_SSLVERSION     => CURL_SSLVERSION_TLSv1_2,
            CURLOPT_SSL_VERIFYPEER => $this->validateSSL,
        ];

        if (!empty($this->certificate)) {
            $this->httpClientConfig[CURLOPT_SSLCERT] = $this->certificate;
        }

        // Initialize Http Client
        $this->setClient();

        // Set default values.
        $this->setDefaultValues();

        // Set PayPal API Endpoint.
        $this->apiUrl = $this->config['api_url'];

        // Set PayPal IPN Notification URL
        $this->notifyUrl = $this->config['notify_url'];
    }
704992
public synchronized void setEndpoint(URI endpoint) {
        checkUpdatable();
        int port = endpoint.getPort();
        if (port==80||port==443) {
            if (MwsUtl.usesStandardPort(endpoint)) {
                try {
                    //some versions of apache http client cause signature errors when
                    //standard port is explicitly used, so remove that case.
                    endpoint = new URI(endpoint.getScheme(), endpoint.getHost(), 
                            endpoint.getPath(), endpoint.getFragment());
                } catch (URISyntaxException e) {
                    throw new IllegalArgumentException(e);
                }
            }
        }
        this.endpoint = endpoint;
    }
133919
public static void setDefaultUri(Configuration conf, URI uri) {
    conf.set(FS_DEFAULT_NAME_KEY, uri.toString());
  }
466487
static public void configHttpFileSystemProxy(FileSystemOptions fsOptions, 
			String webProxyHost, Integer webProxyPort, String webProxyUserName, String webProxyPassword){
		if (webProxyHost != null && webProxyPort != null){
			HttpFileSystemConfigBuilder.getInstance().setProxyHost(fsOptions, webProxyHost);
			HttpFileSystemConfigBuilder.getInstance().setProxyPort(fsOptions, webProxyPort);
			if (webProxyUserName != null){
				StaticUserAuthenticator auth = new StaticUserAuthenticator(webProxyUserName, webProxyPassword, null); 
				HttpFileSystemConfigBuilder.getInstance().setProxyAuthenticator(fsOptions, auth);
			}
		}

	}
176046
public void setPipeConfig(PipeInfo pipeInfo) throws DevFailed {
        ArrayList<PipeInfo> infoList = new ArrayList<PipeInfo>(1);
        infoList.add(pipeInfo);
        setPipeConfig(infoList);
    }
1151686
public synchronized void setDefaultSSLContext() throws Exception {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "setDefaultSSLContext");

        if (FrameworkState.isStopping()) {
            return;
        }

        SSLConfig defaultSSLConfig = getDefaultSSLConfig();

        if (defaultSSLConfig != null)
            JSSEProviderFactory.getInstance(null).setServerDefaultSSLContext(defaultSSLConfig);
        else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "There is no default SSLConfig.");
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "setDefaultSSLContext");

    }
618720
public void configureDefaults() {
    // The pre-initiators part is heavily inspired by Tomcats JreMemoryLeakPreventionListener  
    // See http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?view=markup
    this.addPreInitiator(new AwtToolkitInitiator());
    // initSecurityProviders()
    this.addPreInitiator(new JdbcDriversInitiator());
    this.addPreInitiator(new SunAwtAppContextInitiator());
    this.addPreInitiator(new SecurityPolicyInitiator());
    this.addPreInitiator(new SecurityProvidersInitiator());
    this.addPreInitiator(new DocumentBuilderFactoryInitiator());
    this.addPreInitiator(new ReplaceDOMNormalizerSerializerAbortException());
    this.addPreInitiator(new DatatypeConverterImplInitiator());
    this.addPreInitiator(new JavaxSecurityLoginConfigurationInitiator());
    this.addPreInitiator(new JarUrlConnectionInitiator());
    // Load Sun specific classes that may cause leaks
    this.addPreInitiator(new LdapPoolManagerInitiator());
    this.addPreInitiator(new Java2dDisposerInitiator());
    this.addPreInitiator(new Java2dRenderQueueInitiator());
    this.addPreInitiator(new SunGCInitiator());
    this.addPreInitiator(new OracleJdbcThreadInitiator());

    this.addCleanUp(new BeanIntrospectorCleanUp());
    
    // Apache Commons Pool can leave unfinished threads. Anything specific we can do?
    this.addCleanUp(new BeanELResolverCleanUp());
    this.addCleanUp(new BeanValidationCleanUp());
    this.addCleanUp(new JacksonCleanUp());
    this.addCleanUp(new JavaServerFaces2746CleanUp());
    this.addCleanUp(new GeoToolsCleanUp());
    // Can we do anything about Google Guice ?
    // Can we do anything about Groovy http://jira.codehaus.org/browse/GROOVY-4154 ?
    this.addCleanUp(new IntrospectionUtilsCleanUp());
    // Can we do anything about Logback http://jira.qos.ch/browse/LBCORE-205 ?
    this.addCleanUp(new IIOServiceProviderCleanUp()); // clear ImageIO registry
    this.addCleanUp(new MoxyCleanUp());
    this.addCleanUp(new ReactorNettyHttpResourcesCleanUp());
    this.addCleanUp(new ThreadGroupContextCleanUp());
    this.addCleanUp(new X509TrustManagerImplUnparseableExtensionCleanUp());
    this.addCleanUp(new SAAJEnvelopeFactoryParserPoolCleanUp());
    
    ////////////////////
    // Fix generic leaks
    this.addCleanUp(new DriverManagerCleanUp());
    
    this.addCleanUp(new DefaultAuthenticatorCleanUp());

    this.addCleanUp(new MBeanCleanUp());
    this.addCleanUp(new MXBeanNotificationListenersCleanUp());
    
    this.addCleanUp(new ShutdownHookCleanUp());
    this.addCleanUp(new PropertyEditorCleanUp());
    this.addCleanUp(new SecurityProviderCleanUp());
    this.addCleanUp(new JceSecurityCleanUp()); // (Probably best to do after deregistering the providers)
    this.addCleanUp(new ProxySelectorCleanUp());
    this.addCleanUp(new RmiTargetsCleanUp());
    this.addCleanUp(new StopThreadsCleanUp());
    this.addCleanUp(new ThreadGroupCleanUp());
    this.addCleanUp(new ThreadLocalCleanUp()); // This must be done after threads have been stopped, or new ThreadLocals may be added by those threads
    this.addCleanUp(new KeepAliveTimerCacheCleanUp());
    this.addCleanUp(new ResourceBundleCleanUp());
    this.addCleanUp(new JDK8151486CleanUp());
    this.addCleanUp(new JavaUtilLoggingLevelCleanUp()); // Do this last, in case other shutdown procedures want to log something.
    this.addCleanUp(new ApacheCommonsLoggingCleanUp()); // Do this last, in case other shutdown procedures want to log something.
    
  }