Example usage for org.apache.http.impl.nio.client HttpExchange getTimeout

List of usage examples for org.apache.http.impl.nio.client HttpExchange getTimeout

Introduction

In this page you can find the example usage for org.apache.http.impl.nio.client HttpExchange getTimeout.

Prototype

public int getTimeout() 

Source Link

Usage

From source file:org.apache.http.impl.nio.client.NHttpClientProtocolHandler.java

private void continueRequest(final NHttpClientConnection conn, final HttpExchange httpexchange) {
    int timeout = httpexchange.getTimeout();
    conn.setSocketTimeout(timeout);//from   ww  w .  java2s  .c  om
    conn.requestOutput();
}

From source file:org.apache.http.impl.nio.client.NHttpClientProtocolHandler.java

private void cancelRequest(final NHttpClientConnection conn, final HttpExchange httpexchange)
        throws IOException {
    int timeout = httpexchange.getTimeout();
    conn.setSocketTimeout(timeout);/*from  w  w w  . j  ava  2 s .com*/
    conn.resetOutput();
    httpexchange.resetOutput();
}