Search in sources :

Example 1 with SimpleHttpConnectionManager

use of org.apache.commons.httpclient.SimpleHttpConnectionManager in project openhab1-addons by openhab.

the class CcuClient method start.

/**
     * {@inheritDoc}
     */
@Override
public void start() throws HomematicClientException {
    logger.info("Starting {}", CcuClient.class.getSimpleName());
    super.start();
    tclregaScripts = loadTclRegaScripts();
    httpClient = new HttpClient(new SimpleHttpConnectionManager(true));
    HttpClientParams params = httpClient.getParams();
    Long timeout = context.getConfig().getTimeout() * 1000L;
    params.setConnectionManagerTimeout(timeout);
    params.setSoTimeout(timeout.intValue());
    params.setContentCharset("ISO-8859-1");
}
Also used : HttpClient(org.apache.commons.httpclient.HttpClient) HttpClientParams(org.apache.commons.httpclient.params.HttpClientParams) SimpleHttpConnectionManager(org.apache.commons.httpclient.SimpleHttpConnectionManager)

Aggregations

HttpClient (org.apache.commons.httpclient.HttpClient)1 SimpleHttpConnectionManager (org.apache.commons.httpclient.SimpleHttpConnectionManager)1 HttpClientParams (org.apache.commons.httpclient.params.HttpClientParams)1