Example usage for org.apache.http.impl.nio.conn CPoolEntry setSocketTimeout

List of usage examples for org.apache.http.impl.nio.conn CPoolEntry setSocketTimeout

Introduction

In this page you can find the example usage for org.apache.http.impl.nio.conn CPoolEntry setSocketTimeout.

Prototype

public void setSocketTimeout(final int socketTimeout) 

Source Link

Usage

From source file:org.apache.http.impl.nio.conn.CPool.java

@Override
protected CPoolEntry createEntry(final HttpRoute route, final ManagedNHttpClientConnection conn) {
    final CPoolEntry entry = new CPoolEntry(this.log, conn.getId(), route, conn, this.timeToLive, this.tunit);
    entry.setSocketTimeout(conn.getSocketTimeout());
    return entry;
}

From source file:org.apache.http.impl.nio.conn.CPool.java

@Override
protected void onRelease(final CPoolEntry entry) {
    final NHttpClientConnection conn = entry.getConnection();
    entry.setSocketTimeout(conn.getSocketTimeout());
    conn.setSocketTimeout(0);/*ww w  . ja  va  2 s  .c  o m*/
}