Examples of SyncBasicHttpParams


Examples of org.apache.http.params.SyncBasicHttpParams

                new ResponseConnControl()
        });
    }

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

Examples of org.apache.http.params.SyncBasicHttpParams

     */
    @Override
    protected void setUp() throws Exception {

        if (defaultParams == null) {
            defaultParams = new SyncBasicHttpParams();
            HttpProtocolParams.setVersion
                (defaultParams, HttpVersion.HTTP_1_1);
            HttpProtocolParams.setContentCharset
                (defaultParams, "UTF-8");
            HttpProtocolParams.setUserAgent
View Full Code Here

Examples of org.apache.http.params.SyncBasicHttpParams

     * 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,
View Full Code Here

Examples of org.apache.http.params.SyncBasicHttpParams

    }

   
    @Override
    protected HttpParams createHttpParams() {
        HttpParams params = new SyncBasicHttpParams();
        HttpProtocolParams.setVersion(params,
                HttpVersion.HTTP_1_1);
        HttpProtocolParams.setContentCharset(params,
                HTTP.DEFAULT_CONTENT_CHARSET);
        HttpConnectionParams.setTcpNoDelay(params,
View Full Code Here

Examples of org.apache.http.params.SyncBasicHttpParams

        }
       
        DefaultHttpAsyncClient dhac = new DefaultHttpAsyncClient(connectionManager) {
            @Override
            protected HttpParams createHttpParams() {
                HttpParams params = new SyncBasicHttpParams();
                HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
                HttpConnectionParams.setTcpNoDelay(params, true);
                HttpConnectionParams.setSocketBufferSize(params, 16332);
                HttpConnectionParams.setConnectionTimeout(params, (int)c.getClient().getConnectionTimeout());
                return params;
View Full Code Here

Examples of org.apache.http.params.SyncBasicHttpParams

        }
       
        DefaultHttpAsyncClient dhac = new DefaultHttpAsyncClient(connectionManager) {
            @Override
            protected HttpParams createHttpParams() {
                HttpParams params = new SyncBasicHttpParams();
                HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
                HttpConnectionParams.setTcpNoDelay(params, true);
                int bufSize = c.getClient().getChunkLength() > 0 ? c.getClient().getChunkLength() : 16332;
                HttpConnectionParams.setSocketBufferSize(params, bufSize);
                HttpConnectionParams.setConnectionTimeout(params, (int)c.getClient().getConnectionTimeout());
View Full Code Here

Examples of org.apache.http.params.SyncBasicHttpParams

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

Examples of org.apache.http.params.SyncBasicHttpParams

        this(connmgr, null);
    }

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

Examples of org.apache.http.params.SyncBasicHttpParams

    protected TestHttpServer server;
    protected TestHttpClient client;
   
    @Override
    protected void setUp() throws Exception {
        HttpParams serverParams = new SyncBasicHttpParams();
        serverParams
            .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, "TEST-SERVER/1.1");

        this.server = new TestHttpServer(serverParams);
        this.server.setExceptionHandler(new SimpleIOReactorExceptionHandler());

        HttpParams clientParams = new SyncBasicHttpParams();
        clientParams
            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 60000)
            .setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 60000)
            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
View Full Code Here

Examples of org.apache.http.params.SyncBasicHttpParams

    protected TestHttpSSLServer server;
    protected TestHttpSSLClient client;
   
    @Override
    protected void setUp() throws Exception {
        HttpParams serverParams = new SyncBasicHttpParams();
        serverParams
            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 120000)
            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
            .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
       
        this.server = new TestHttpSSLServer(serverParams);
        this.server.setExceptionHandler(new SimpleIOReactorExceptionHandler());
       
        HttpParams clientParams = new SyncBasicHttpParams();
        clientParams
            .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 120000)
            .setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 120000)
            .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
            .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
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.