Package org.apache.http.params

Examples of org.apache.http.params.SyncBasicHttpParams


        HttpProcessor httprocessor = Mockito.mock(HttpProcessor.class);
        ConnectionReuseStrategy connReuseStrategy = Mockito.mock(ConnectionReuseStrategy.class);
        HttpResponseFactory responseFactory = Mockito.mock(HttpResponseFactory.class);
        HttpRequestHandlerResolver handlerResolver = Mockito.mock(HttpRequestHandlerResolver.class);
        HttpRequestHandler requestHandler = Mockito.mock(HttpRequestHandler.class);
        HttpParams params = new SyncBasicHttpParams();

        HttpService httpservice = new HttpService(
                httprocessor,
                connReuseStrategy,
                responseFactory,
View Full Code Here


        HttpProcessor httprocessor = Mockito.mock(HttpProcessor.class);
        ConnectionReuseStrategy connReuseStrategy = Mockito.mock(ConnectionReuseStrategy.class);
        HttpResponseFactory responseFactory = Mockito.mock(HttpResponseFactory.class);
        HttpRequestHandlerResolver handlerResolver = Mockito.mock(HttpRequestHandlerResolver.class);
        HttpRequestHandler requestHandler = Mockito.mock(HttpRequestHandler.class);
        HttpParams params = new SyncBasicHttpParams();

        HttpService httpservice = new HttpService(
                httprocessor,
                connReuseStrategy,
                responseFactory,
View Full Code Here

        HttpProcessor httprocessor = Mockito.mock(HttpProcessor.class);
        ConnectionReuseStrategy connReuseStrategy = Mockito.mock(ConnectionReuseStrategy.class);
        HttpResponseFactory responseFactory = Mockito.mock(HttpResponseFactory.class);
        HttpRequestHandlerResolver handlerResolver = Mockito.mock(HttpRequestHandlerResolver.class);
        HttpRequestHandler requestHandler = Mockito.mock(HttpRequestHandler.class);
        HttpParams params = new SyncBasicHttpParams();

        HttpService httpservice = new HttpService(
                httprocessor,
                connReuseStrategy,
                responseFactory,
View Full Code Here

     *
     * @return a new instance of {@link SyncBasicHttpParams} with the defaults applied to it.
     */
    @Override
    protected HttpParams createHttpParams() {
        HttpParams params = new SyncBasicHttpParams();
        setDefaultHttpParams(params);
        return params;
    }
View Full Code Here

                uri.getPort() > 0 ? uri.getPort() : 80,
                uri.getScheme() != null ? uri.getScheme() : "http");

        System.out.println("Reverse proxy to " + targetHost);

        HttpParams params = new SyncBasicHttpParams();
        params
            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 30000)
            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
            .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "Test/1.1")
            .setParameter(CoreProtocolPNames.USER_AGENT, "Test/1.1");
View Full Code Here

        int port = 8080;
        if (args.length >= 2) {
            port = Integer.parseInt(args[1]);
        }
        // HTTP parameters for the server
        HttpParams params = new SyncBasicHttpParams();
        params
            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
            .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "HttpTest/1.1");
        // Create HTTP protocol processing chain
View Full Code Here

     * Obtains a set of reasonable default parameters for a server.
     *
     * @return  default parameters
     */
    protected HttpParams newDefaultParams() {
        HttpParams params = new SyncBasicHttpParams();
        params
            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 60000)
            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
            .setParameter(CoreProtocolPNames.ORIGIN_SERVER,
View Full Code Here

        super(new IOReactorConfig());
    }

    @Override
    protected HttpParams createHttpParams() {
        final HttpParams params = new SyncBasicHttpParams();
        setDefaultHttpParams(params);
        return params;
    }
View Full Code Here

        super(new IOReactorConfig());
    }

    @Override
    protected HttpParams createHttpParams() {
        HttpParams params = new SyncBasicHttpParams();
        setDefaultHttpParams(params);
        return params;
    }
View Full Code Here

        }

    }

    public void initServer() throws Exception {
        this.serverParams = new SyncBasicHttpParams();
        this.serverParams
            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 60000)
            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
View Full Code Here

TOP

Related Classes of org.apache.http.params.SyncBasicHttpParams

Copyright © 2018 www.massapicom. 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.