Code example for HttpClient

Methods: getParams

0
        } else { 
            client = new DefaultHttpClient(Utilities.poolManager(pooledMax));
        } 
 
        if (proxy != null) {
            client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
        } 
 
        if (timeout > 0) {
            HttpParams params = client.getParams();
            HttpConnectionParams.setConnectionTimeout(params, timeout);
            HttpConnectionParams.setSoTimeout(params, timeout);
        } 
 
        // Configure service 
        AbstractC2DMService service;
        if (pooledMax == 1) {
            service = new C2DMServiceImpl(client, serviceUri, authToken, delegate);
        } else { 
            service = new C2DMPooledService(client, serviceUri, authToken, executor, delegate);
        } 
 
        if (isQueued) {
            service = new C2DMQueuedService(service, serviceUri, authToken);
        }