public HttpConnectionParams getParams() { if (hasConnection()) { return wrappedConnection.getParams(); } else { throw new IllegalStateException("Connection has been released"); } }
public HttpConnection getConnectionWithTimeout( HostConfiguration hostConfiguration, long timeout) { httpConnection = new HttpConnection(hostConfiguration); httpConnection.setHttpConnectionManager(this); httpConnection.getParams().setDefaults(connectionParams); return httpConnection; }
/** * Applies connection parameters specified for a given method * * @param method HTTP method * * @throws IOException if an I/O occurs setting connection parameters */ private void applyConnectionParams(final HttpMethod method) throws IOException { int timeout = 0; // see if a timeout is given for this method Object param = method.getParams().getParameter(HttpMethodParams.SO_TIMEOUT); if (param == null) { // if not, use the default value param = this.conn.getParams().getParameter(HttpConnectionParams.SO_TIMEOUT); } if (param != null) { timeout = ((Integer)param).intValue(); } this.conn.setSocketTimeout(timeout); }
LOG.trace("Attempt number " + execCount + " to process request"); if (this.conn.getParams().isStaleCheckingEnabled()) { this.conn.closeIfStale();
if ((len > 0) && ("chunked".equalsIgnoreCase(encodings[len - 1].getName()))) { if (conn.isResponseAvailable(conn.getParams().getSoTimeout())) { result = new ChunkedInputStream(is, this); } else {
int readTimeout = conn.getParams().getSoTimeout(); try { conn.setSocketTimeout(RESPONSE_WAIT_TIME_MS);
httpConnection = new HttpConnection(hostConfiguration); httpConnection.setHttpConnectionManager(this); httpConnection.getParams().setDefaults(this.params); } else {
public HttpConnectionParams getParams() { if (hasConnection()) { return wrappedConnection.getParams(); } else { throw new IllegalStateException("Connection has been released"); } }
public HttpConnectionParams getParams() { if (hasConnection()) { return wrappedConnection.getParams(); } else { throw new IllegalStateException("Connection has been released"); } }
public HttpConnectionParams getParams() { if (hasConnection()) { return wrappedConnection.getParams(); } else { throw new IllegalStateException("Connection has been released"); } }
public HttpConnectionParams getParams() { if (hasConnection()) { return wrappedConnection.getParams(); } else { throw new IllegalStateException("Connection has been released"); } }
public HttpConnectionParams getParams() { if (hasConnection()) { return wrappedConnection.getParams(); } else { throw new IllegalStateException("Connection has been released"); } }
public HttpConnection getConnectionWithTimeout( HostConfiguration hostConfiguration, long timeout) { httpConnection = new HttpConnection(hostConfiguration); httpConnection.setHttpConnectionManager(this); httpConnection.getParams().setDefaults(connectionParams); return httpConnection; }
public HttpConnection getConnectionWithTimeout( HostConfiguration hostConfiguration, long timeout) { httpConnection = new HttpConnection(hostConfiguration); httpConnection.setHttpConnectionManager(this); httpConnection.getParams().setDefaults(connectionParams); return httpConnection; }
public HttpConnection getConnectionWithTimeout( HostConfiguration hostConfiguration, long timeout) { httpConnection = new HttpConnection(hostConfiguration); httpConnection.setHttpConnectionManager(this); httpConnection.getParams().setDefaults(connectionParams); return httpConnection; }
public HttpConnection getConnectionWithTimeout( HostConfiguration hostConfiguration, long timeout) { httpConnection = new HttpConnection(hostConfiguration); httpConnection.setHttpConnectionManager(this); httpConnection.getParams().setDefaults(connectionParams); return httpConnection; }
public HttpConnection getConnectionWithTimeout( HostConfiguration hostConfiguration, long timeout) { HttpConnection conn = new HttpConnection(hostConfiguration); conn.setHttpConnectionManager(this); conn.getParams().setDefaults(this.getParams()); return conn; }
public HttpConnection getConnectionWithTimeout( HostConfiguration hostConfiguration, long timeout) { HttpConnection conn = new HttpConnection(hostConfiguration); conn.setHttpConnectionManager(this); conn.getParams().setDefaults(this.getParams()); return conn; }
public HttpConnection getConnectionWithTimeout( HostConfiguration hostConfiguration, long timeout) { HttpConnection conn = new HttpConnection(hostConfiguration); conn.setHttpConnectionManager(this); conn.getParams().setDefaults(this.getParams()); return conn; }
/** * Use custom {@link ZapHttpConnection} to allow for socket exposure. */ @Override public HttpConnection getConnectionWithTimeout( HostConfiguration hostConfiguration, long timeout) { if (httpConnection == null) { httpConnection = new ZapHttpConnection(hostConfiguration); httpConnection.setHttpConnectionManager(this); httpConnection.getParams().setDefaults(this.getParams()); } return super.getConnectionWithTimeout(hostConfiguration, timeout); } }