Example usage for org.apache.http.params HttpParams getBooleanParameter

List of usage examples for org.apache.http.params HttpParams getBooleanParameter

Introduction

In this page you can find the example usage for org.apache.http.params HttpParams getBooleanParameter.

Prototype

boolean getBooleanParameter(String str, boolean z);

Source Link

Usage

From source file:com.google.api.client.http.apache.ApacheHttpTransportTest.java

private void checkHttpClient(HttpClient client) {
    HttpParams params = client.getParams();
    assertFalse(params.getBooleanParameter(ClientPNames.HANDLE_REDIRECTS, true));
    assertEquals(HttpVersion.HTTP_1_1, HttpProtocolParams.getVersion(params));
}

From source file:anhttpclient.impl.ClientConnectionManagerFactoryImpl.java

/**
 * {@inheritDoc}//from  w  w  w.  jav  a 2s .  c o  m
 */
public ClientConnectionManager newInstance(HttpParams params, SchemeRegistry schemeRegistry) {
    if (params != null) {
        boolean threadSafe = params.getBooleanParameter(THREAD_SAFE_CONNECTION_MANAGER, false);
        return threadSafe ? new ThreadSafeClientConnManager(schemeRegistry)
                : new SingleClientConnManager(schemeRegistry);
    }

    return new SingleClientConnManager(schemeRegistry);
}