Examples of HttpClientParams


Examples of org.apache.commons.httpclient.params.HttpClientParams

    public CommonsHttpTransport(Settings settings, String host) {
        this.settings = settings;
        httpInfo = host;

        HttpClientParams params = new HttpClientParams();
        params.setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(
                settings.getHttpRetries(), false) {

            @Override
            public boolean retryMethod(HttpMethod method, IOException exception, int executionCount) {
                if (super.retryMethod(method, exception, executionCount)) {
                    stats.netRetries++;
                    return true;
                }
                return false;
            }
        });

        params.setConnectionManagerTimeout(settings.getHttpTimeout());
        params.setSoTimeout((int) settings.getHttpTimeout());
        HostConfiguration hostConfig = new HostConfiguration();

        hostConfig = setupSSLIfNeeded(settings, hostConfig);
        hostConfig = setupSocksProxy(settings, hostConfig);
        Object[] authSettings = setupHttpProxy(settings, hostConfig);
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpClientParams

    }


    @Override
    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
        HttpClientParams params = new HttpClientParams();
        IntrospectionSupport.setProperties(params, parameters, "httpClient.");

        // create the configurer to use for this endpoint
        final Set<AuthMethod> authMethods = new LinkedHashSet<AuthMethod>();
        HttpClientConfigurer configurer = createHttpClientConfigurer(parameters, authMethods);
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpClientParams

     * Creates an instance of HttpClient using default {@link HttpClientParams parameter set}.
     *
     * @see HttpClientParams
     */
    public HttpClient() {
        this(new HttpClientParams());
    }
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpClientParams

     * to use.
     *
     * @since 2.0
     */
    public HttpClient(HttpConnectionManager httpConnectionManager) {
        this(new HttpClientParams(), httpConnectionManager);
    }
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpClientParams

     * Creates an instance of HttpClient using default {@link HttpClientParams parameter set}.
     *
     * @see HttpClientParams
     */
    public HttpClient() {
        this(new HttpClientParams());
    }
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpClientParams

     * to use.
     *
     * @since 2.0
     */
    public HttpClient(HttpConnectionManager httpConnectionManager) {
        this(new HttpClientParams(), httpConnectionManager);
    }
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpClientParams

    public HttpEndpoint(String endPointURI, HttpComponent component, URI httpURI) throws URISyntaxException {
        this(endPointURI, component, httpURI, null);
    }

    public HttpEndpoint(String endPointURI, HttpComponent component, URI httpURI, HttpConnectionManager httpConnectionManager) throws URISyntaxException {
        this(endPointURI, component, httpURI, new HttpClientParams(), httpConnectionManager, null);
    }
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpClientParams

        Integer proxyPort = getAndRemoveParameter(parameters, "proxyPort", Integer.class);
        String authMethodPriority = getAndRemoveParameter(parameters, "authMethodPriority", String.class);
        HeaderFilterStrategy headerFilterStrategy = resolveAndRemoveReferenceParameter(parameters, "headerFilterStrategy", HeaderFilterStrategy.class);
        UrlRewrite urlRewrite = resolveAndRemoveReferenceParameter(parameters, "urlRewrite", UrlRewrite.class);
        // http client can be configured from URI options
        HttpClientParams clientParams = new HttpClientParams();
        IntrospectionSupport.setProperties(clientParams, parameters, "httpClient.");
        // validate that we could resolve all httpClient. parameters as this component is lenient
        validateParameters(uri, parameters, "httpClient.");      
        // http client can be configured from URI options
        HttpConnectionManagerParams connectionManagerParams = new HttpConnectionManagerParams();
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpClientParams

    private String servletName = "CamelServlet";
    private HttpRegistry httpRegistry;

    @Override
    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
        HttpClientParams params = new HttpClientParams();
        IntrospectionSupport.setProperties(params, parameters, "httpClient.");

        // create the configurer to use for this endpoint
        final Set<AuthMethod> authMethods = new LinkedHashSet<AuthMethod>();
        HttpClientConfigurer configurer = createHttpClientConfigurer(parameters, authMethods);
View Full Code Here

Examples of org.apache.commons.httpclient.params.HttpClientParams

    }

    @Override
    protected Endpoint<HttpExchange> createEndpoint(String uri, String remaining, Map parameters)
        throws Exception {
        HttpClientParams params = new HttpClientParams();
        IntrospectionSupport.setProperties(params, parameters, "httpClient.");

        // validate http uri that end-user did not duplicate the http part that can be a common error
        URI httpUri = new URI(uri);
        String part = httpUri.getSchemeSpecificPart();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.