@Override public void destroy() throws Exception { HttpConnectionManager connectionManager = getHttpClient().getHttpConnectionManager(); if (connectionManager instanceof MultiThreadedHttpConnectionManager) { ((MultiThreadedHttpConnectionManager) connectionManager).shutdown(); } }
@Override public WebServiceConnection createConnection(URI uri) throws IOException { PostMethod postMethod = new PostMethod(uri.toString()); if (isAcceptGzipEncoding()) { postMethod.addRequestHeader(HttpTransportConstants.HEADER_ACCEPT_ENCODING, HttpTransportConstants.CONTENT_ENCODING_GZIP); } return new CommonsHttpConnection(getHttpClient(), postMethod); }
public WebServiceConnection createConnection(URI uri) throws IOException { PostMethod postMethod = new PostMethod(uri.toString()); if (isAcceptGzipEncoding()) { postMethod.addRequestHeader(HttpTransportConstants.HEADER_ACCEPT_ENCODING, HttpTransportConstants.CONTENT_ENCODING_GZIP); } return new CommonsHttpConnection(getHttpClient(), postMethod); }
@Override public void destroy() throws Exception { HttpConnectionManager connectionManager = getHttpClient().getHttpConnectionManager(); if (connectionManager instanceof MultiThreadedHttpConnectionManager) { ((MultiThreadedHttpConnectionManager) connectionManager).shutdown(); } }
@Override public WebServiceConnection createConnection(URI uri) throws IOException { PostMethod postMethod = new PostMethod(uri.toString()); if (isAcceptGzipEncoding()) { postMethod.addRequestHeader(HttpTransportConstants.HEADER_ACCEPT_ENCODING, HttpTransportConstants.CONTENT_ENCODING_GZIP); } return new CommonsHttpConnection(getHttpClient(), postMethod); }
@Override public void destroy() throws Exception { HttpConnectionManager connectionManager = getHttpClient().getHttpConnectionManager(); if (connectionManager instanceof MultiThreadedHttpConnectionManager) { ((MultiThreadedHttpConnectionManager) connectionManager).shutdown(); } }
public void destroy() throws Exception { HttpConnectionManager connectionManager = getHttpClient().getHttpConnectionManager(); if (connectionManager instanceof MultiThreadedHttpConnectionManager) { ((MultiThreadedHttpConnectionManager) connectionManager).shutdown(); } }
@Override public WebServiceConnection createConnection(URI uri) throws IOException { PostMethod postMethod = new PostMethod(uri.toString()); if (isAcceptGzipEncoding()) { postMethod.addRequestHeader(HttpTransportConstants.HEADER_ACCEPT_ENCODING, HttpTransportConstants.CONTENT_ENCODING_GZIP); } return new CommonsHttpConnection(getHttpClient(), postMethod); }
/** * Sets the maximum number of connections allowed for the underlying HttpClient. * * @param maxTotalConnections the maximum number of connections allowed * @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setMaxTotalConnections(int) */ public void setMaxTotalConnections(int maxTotalConnections) { if (maxTotalConnections <= 0) { throw new IllegalArgumentException("maxTotalConnections must be a positive value"); } getHttpClient().getHttpConnectionManager().getParams().setMaxTotalConnections(maxTotalConnections); }
/** * Set the socket read timeout for the underlying HttpClient. A value of 0 means <em>never</em> timeout. * * @param timeout the timeout value in milliseconds * @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setSoTimeout(int) */ public void setReadTimeout(int timeout) { if (timeout < 0) { throw new IllegalArgumentException("timeout must be a non-negative value"); } getHttpClient().getHttpConnectionManager().getParams().setSoTimeout(timeout); }
/** * Sets the maximum number of connections allowed for the underlying HttpClient. * * @param maxTotalConnections the maximum number of connections allowed * @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setMaxTotalConnections(int) */ public void setMaxTotalConnections(int maxTotalConnections) { if (maxTotalConnections <= 0) { throw new IllegalArgumentException("maxTotalConnections must be a positive value"); } getHttpClient().getHttpConnectionManager().getParams().setMaxTotalConnections(maxTotalConnections); }
/** * Sets the timeout until a connection is etablished. A value of 0 means <em>never</em> timeout. * * @param timeout the timeout value in milliseconds * @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setConnectionTimeout(int) */ public void setConnectionTimeout(int timeout) { if (timeout < 0) { throw new IllegalArgumentException("timeout must be a non-negative value"); } getHttpClient().getHttpConnectionManager().getParams().setConnectionTimeout(timeout); }
/** * Sets the timeout until a connection is etablished. A value of 0 means <em>never</em> timeout. * * @param timeout the timeout value in milliseconds * @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setConnectionTimeout(int) */ public void setConnectionTimeout(int timeout) { if (timeout < 0) { throw new IllegalArgumentException("timeout must be a non-negative value"); } getHttpClient().getHttpConnectionManager().getParams().setConnectionTimeout(timeout); }
/** * Set the socket read timeout for the underlying HttpClient. A value of 0 means <em>never</em> timeout. * * @param timeout the timeout value in milliseconds * @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setSoTimeout(int) */ public void setReadTimeout(int timeout) { if (timeout < 0) { throw new IllegalArgumentException("timeout must be a non-negative value"); } getHttpClient().getHttpConnectionManager().getParams().setSoTimeout(timeout); }
/** * Set the socket read timeout for the underlying HttpClient. A value of 0 means <em>never</em> timeout. * * @param timeout the timeout value in milliseconds * @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setSoTimeout(int) */ public void setReadTimeout(int timeout) { if (timeout < 0) { throw new IllegalArgumentException("timeout must be a non-negative value"); } getHttpClient().getHttpConnectionManager().getParams().setSoTimeout(timeout); }
/** * Set the socket read timeout for the underlying HttpClient. A value of 0 means <em>never</em> timeout. * * @param timeout the timeout value in milliseconds * @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setSoTimeout(int) */ public void setReadTimeout(int timeout) { if (timeout < 0) { throw new IllegalArgumentException("timeout must be a non-negative value"); } getHttpClient().getHttpConnectionManager().getParams().setSoTimeout(timeout); }
/** * Sets the maximum number of connections allowed for the underlying HttpClient. * * @param maxTotalConnections the maximum number of connections allowed * @see org.apache.commons.httpclient.params.HttpConnectionManagerParams#setMaxTotalConnections(int) */ public void setMaxTotalConnections(int maxTotalConnections) { if (maxTotalConnections <= 0) { throw new IllegalArgumentException("maxTotalConnections must be a positive value"); } getHttpClient().getHttpConnectionManager().getParams().setMaxTotalConnections(maxTotalConnections); }
@Override public void afterPropertiesSet() throws Exception { if (getCredentials() != null) { getHttpClient().getState().setCredentials(getAuthScope(), getCredentials()); getHttpClient().getParams().setAuthenticationPreemptive(true); } }
@Override public void afterPropertiesSet() throws Exception { if (getCredentials() != null) { getHttpClient().getState().setCredentials(getAuthScope(), getCredentials()); getHttpClient().getParams().setAuthenticationPreemptive(true); } }
@Override public void afterPropertiesSet() throws Exception { if (getCredentials() != null) { getHttpClient().getState().setCredentials(getAuthScope(), getCredentials()); getHttpClient().getParams().setAuthenticationPreemptive(true); } }